LogControl
The graphical component for logs displaying.
Inherits: UserControl
Implements: ILogListener, IPersistable, IDisposable, IComponentConnector
Constructors
public LogControl()
logControl = LogControl()
Initializes a new instance of the LogControl.
Properties
public bool AutoResize { get; set; }
value = logControl.AutoResize
logControl.AutoResize = value
Automatically to align the width of the columns by content. The default is off.
public bool AutoScroll { get; set; }
value = logControl.AutoScroll
logControl.AutoScroll = value
Automatically to scroll control on the last row added. The default is off.
public ICommand ClearCommand { get; set; }
value = logControl.ClearCommand
logControl.ClearCommand = value
The command to clear log items.
public string Like { get; set; }
value = logControl.Like
logControl.Like = value
Text filter for the log messages.
public int MaxItemsCount { get; set; }
value = logControl.MaxItemsCount
logControl.MaxItemsCount = value
The maximum number of entries to display. The -1 value means an unlimited amount of records. By default, the last 10000 records for 64-bit process and 1000 records for 32-bit process are displayed.
public LogMessageCollection Messages { get; set; }
value = logControl.Messages
logControl.Messages = value
The log entries collection.
public bool ShowDebug { get; set; }
value = logControl.ShowDebug
logControl.ShowDebug = value
To show messages of type Debug. Enabled by default.
public bool ShowError { get; set; }
value = logControl.ShowError
logControl.ShowError = value
To show messages of type Error. Enabled by default.
public bool ShowInfo { get; set; }
value = logControl.ShowInfo
logControl.ShowInfo = value
To show messages of type Info. Enabled by default.
public bool ShowSourceNameColumn { get; set; }
value = logControl.ShowSourceNameColumn
logControl.ShowSourceNameColumn = value
To show the column with the source name. Enabled by default.
public bool ShowVerbose { get; set; }
value = logControl.ShowVerbose
logControl.ShowVerbose = value
To show messages of type Verbose. Enabled by default.
public bool ShowWarning { get; set; }
value = logControl.ShowWarning
logControl.ShowWarning = value
To show messages of type Warning. Enabled by default.
public string TimeFormat { get; set; }
value = logControl.TimeFormat
logControl.TimeFormat = value
Format for conversion time into a string. The default format is yy/MM/dd HH:mm:ss.fff.
Methods
public static bool GetLogAutoResize(UIElement element)
result = LogControl.GetLogAutoResize(element)
To get the value for AutoResize.
- element
- Object LogControl.
Returns: The value of AutoResize.
public static bool GetLogAutoScroll(UIElement element)
result = LogControl.GetLogAutoScroll(element)
To get the value for AutoScroll.
- element
- Object LogControl.
Returns: The value of AutoScroll.
public static int GetLogMaxItemsCount(UIElement element)
result = LogControl.GetLogMaxItemsCount(element)
To get the value for MaxItemsCount.
- element
- Object LogControl.
Returns: The value of MaxItemsCount.
public static bool GetLogShowSourceNameColumn(UIElement element)
result = LogControl.GetLogShowSourceNameColumn(element)
To get the value for ShowSourceNameColumn.
- element
- Object LogControl.
Returns: The value of ShowSourceNameColumn.
public void InitializeComponent()
logControl.InitializeComponent()
InitializeComponent
public void Load(SettingsStorage storage)
logControl.Load(storage)
Load settings.
- storage
- Settings storage.
public void Save(SettingsStorage storage)
logControl.Save(storage)
Save settings.
- storage
- Settings storage.
public static void SetLogAutoResize(UIElement element, bool value)
LogControl.SetLogAutoResize(element, value)
To set the value for AutoResize.
- element
- Object LogControl.
- value
- New value for AutoResize.
public static void SetLogAutoScroll(UIElement element, bool value)
LogControl.SetLogAutoScroll(element, value)
To set the value for AutoScroll.
- element
- Object LogControl.
- value
- New value for AutoScroll.
public static void SetLogMaxItemsCount(UIElement element, int value)
LogControl.SetLogMaxItemsCount(element, value)
To set the value for MaxItemsCount.
- element
- Object LogControl.
- value
- New value for MaxItemsCount.
public static void SetLogShowSourceNameColumn(UIElement element, bool value)
LogControl.SetLogShowSourceNameColumn(element, value)
To set the value for ShowSourceNameColumn.
- element
- Object LogControl.
- value
- New value for ShowSourceNameColumn.
Events
public event Action LayoutChanged
logControl.LayoutChanged += handler
Layout changed event.
Fields
public static readonly DependencyProperty AutoResizeProperty
value = LogControl.AutoResizeProperty
DependencyProperty for AutoResize.
public static readonly DependencyProperty AutoScrollProperty
value = LogControl.AutoScrollProperty
DependencyProperty for AutoScroll.
public static readonly DependencyProperty ClearCommandProperty
value = LogControl.ClearCommandProperty
DependencyProperty for ClearCommand.
public static readonly DependencyProperty LogAutoResizeProperty
value = LogControl.LogAutoResizeProperty
DependencyProperty for AutoResize.
public static readonly DependencyProperty LogAutoScrollProperty
value = LogControl.LogAutoScrollProperty
DependencyProperty for AutoScroll.
public static readonly DependencyProperty LogMaxItemsCountProperty
value = LogControl.LogMaxItemsCountProperty
DependencyProperty for MaxItemsCount.
public static readonly DependencyProperty LogShowSourceNameColumnProperty
value = LogControl.LogShowSourceNameColumnProperty
DependencyProperty for ShowSourceNameColumn.
public static readonly DependencyProperty MaxItemsCountProperty
value = LogControl.MaxItemsCountProperty
DependencyProperty for MaxItemsCount.
public static readonly DependencyProperty MessagesProperty
value = LogControl.MessagesProperty
DependencyProperty for Messages.
public static readonly DependencyProperty ShowDebugProperty
value = LogControl.ShowDebugProperty
DependencyProperty for ShowDebug.
public static readonly DependencyProperty ShowErrorProperty
value = LogControl.ShowErrorProperty
DependencyProperty for ShowError.
public static readonly DependencyProperty ShowInfoProperty
value = LogControl.ShowInfoProperty
DependencyProperty for ShowInfo.
public static readonly DependencyProperty ShowSourceNameColumnProperty
value = LogControl.ShowSourceNameColumnProperty
DependencyProperty for ShowSourceNameColumn.
public static readonly DependencyProperty ShowVerboseProperty
value = LogControl.ShowVerboseProperty
DependencyProperty for ShowVerbose.
public static readonly DependencyProperty ShowWarningProperty
value = LogControl.ShowWarningProperty
DependencyProperty for ShowWarning.
public static readonly DependencyProperty TimeFormatProperty
value = LogControl.TimeFormatProperty
DependencyProperty for TimeFormat.