Table of Contents

Bottom Message Bar on Main Panel

Layout

  • Bottom Message Bar
    • Brief Message Text Field
    • Show Log Button
Tip

The text field should be selectable to let user easy to copy the message.

Initialize MessageKit.Default with Message Bar

To show and save the message on Brief Message Text Field, add event to Default.OnAdding.

The event contains:

  • update the text content of Brief Message Text Field
  • Append the message to log file (create if not existed) $"logs/log-{DateTime.Now:yyyy-MM-dd}.txt"
Tip
  • Handle the situation that logs over one day.
  • Check if passing argument of OnAdding is Exception. If the it is Exception, update text content by Exception.Message but log to file with the full Exception information.
  • Apply alert style of Brief Message Text Field if passing argument is exception.

Behavior of Show Log Button

Call an editor (or reader) to show the current log.

Tip

Handle the situation that the current log file does not exist. It may occurs if no message has added.