LogControl
显示日志的图形组件 。
继承自: UserControl
实现: ILogListener, IPersistable, IDisposable, IComponentConnector
构造函数
属性
public bool AutoResize { get; set; }
value = logControl.AutoResize
logControl.AutoResize = value
自动按内容对齐列宽。默认关闭 。
public bool AutoScroll { get; set; }
value = logControl.AutoScroll
logControl.AutoScroll = value
自动滚动上行的控制。默认值已关闭 。
public ICommand ClearCommand { get; set; }
value = logControl.ClearCommand
logControl.ClearCommand = value
清除日志项的命令 。
public int MaxItemsCount { get; set; }
value = logControl.MaxItemsCount
logControl.MaxItemsCount = value
显示条目的最大数量。 -1 值意味着无限数量的记录。默认情况下,显示的是64位进程的最后一万个记录和32位进程的最后一万个记录。
public LogMessageCollection Messages { get; set; }
value = logControl.Messages
logControl.Messages = value
日志条目集.
public bool ShowDebug { get; set; }
value = logControl.ShowDebug
logControl.ShowDebug = value
要显示调试类型的信件。 默认已启用 。
public bool ShowError { get; set; }
value = logControl.ShowError
logControl.ShowError = value
显示类型错误的信件。 默认启用 。
public bool ShowInfo { get; set; }
value = logControl.ShowInfo
logControl.ShowInfo = value
显示信息类型。 默认启用 。
public bool ShowSourceNameColumn { get; set; }
value = logControl.ShowSourceNameColumn
logControl.ShowSourceNameColumn = value
要显示带有源名的列。 默认启用 。
public bool ShowVerbose { get; set; }
value = logControl.ShowVerbose
logControl.ShowVerbose = value
显示 Verbose 类型的信件。 默认已启用 。
public bool ShowWarning { get; set; }
value = logControl.ShowWarning
logControl.ShowWarning = value
显示类型警告。 默认启用 。
public string TimeFormat { get; set; }
value = logControl.TimeFormat
logControl.TimeFormat = value
转换时间为字符串的格式。默认格式为yy/MM/dd HH:mm: ss.fff。
方法
public static bool GetLogAutoResize(UIElement element)
result = LogControl.GetLogAutoResize(element)
To get the value for AutoResize.
- element
- Object LogControl.
返回值: The value of AutoResize.
public static bool GetLogAutoScroll(UIElement element)
result = LogControl.GetLogAutoScroll(element)
To get the value for AutoScroll.
- element
- Object LogControl.
返回值: The value of AutoScroll.
public static int GetLogMaxItemsCount(UIElement element)
result = LogControl.GetLogMaxItemsCount(element)
To get the value for MaxItemsCount.
- element
- Object LogControl.
返回值: The value of MaxItemsCount.
public static bool GetLogShowSourceNameColumn(UIElement element)
result = LogControl.GetLogShowSourceNameColumn(element)
要得到ShowSourceNameColumn的值。
- element
- Object LogControl.
返回值: The value of ShowSourceNameColumn.
public void InitializeComponent()
logControl.InitializeComponent()
InitializeComponent
public static void SetLogAutoResize(UIElement element, bool value)
LogControl.SetLogAutoResize(element, value)
设置 &% AutoResize 的值 。
- element
- Object LogControl.
- value
- New value for AutoResize.
public static void SetLogAutoScroll(UIElement element, bool value)
LogControl.SetLogAutoScroll(element, value)
设置 &% AutoScroll 的值 。
- element
- Object LogControl.
- value
- New value for AutoScroll.
public static void SetLogMaxItemsCount(UIElement element, int value)
LogControl.SetLogMaxItemsCount(element, value)
设置 &% MaxItemsCount 的值 。
- element
- Object LogControl.
- value
- New value for MaxItemsCount.
public static void SetLogShowSourceNameColumn(UIElement element, bool value)
LogControl.SetLogShowSourceNameColumn(element, value)
设置 &% ShowSourceNameColumn 的值 。
- element
- Object LogControl.
- value
- New value for ShowSourceNameColumn.
事件
字段
public static readonly DependencyProperty AutoResizeProperty
value = LogControl.AutoResizeProperty
DependencyProperty 为AutoResize.
public static readonly DependencyProperty AutoScrollProperty
value = LogControl.AutoScrollProperty
DependencyProperty 为AutoScroll.
public static readonly DependencyProperty ClearCommandProperty
value = LogControl.ClearCommandProperty
DependencyProperty 为ClearCommand.
public static readonly DependencyProperty LogAutoResizeProperty
value = LogControl.LogAutoResizeProperty
DependencyProperty 为AutoResize.
public static readonly DependencyProperty LogAutoScrollProperty
value = LogControl.LogAutoScrollProperty
DependencyProperty 为AutoScroll.
public static readonly DependencyProperty LogMaxItemsCountProperty
value = LogControl.LogMaxItemsCountProperty
DependencyProperty 为MaxItemsCount.
public static readonly DependencyProperty LogShowSourceNameColumnProperty
value = LogControl.LogShowSourceNameColumnProperty
DependencyProperty 为ShowSourceNameColumn.
public static readonly DependencyProperty MaxItemsCountProperty
value = LogControl.MaxItemsCountProperty
DependencyProperty 为MaxItemsCount.
public static readonly DependencyProperty MessagesProperty
value = LogControl.MessagesProperty
DependencyProperty for Messages.
public static readonly DependencyProperty ShowDebugProperty
value = LogControl.ShowDebugProperty
DependencyProperty 为ShowDebug.
public static readonly DependencyProperty ShowErrorProperty
value = LogControl.ShowErrorProperty
DependencyProperty 为ShowError.
public static readonly DependencyProperty ShowInfoProperty
value = LogControl.ShowInfoProperty
DependencyProperty 为ShowInfo.
public static readonly DependencyProperty ShowSourceNameColumnProperty
value = LogControl.ShowSourceNameColumnProperty
DependencyProperty 为ShowSourceNameColumn.
public static readonly DependencyProperty ShowVerboseProperty
value = LogControl.ShowVerboseProperty
DependencyProperty 为ShowVerbose.
public static readonly DependencyProperty ShowWarningProperty
value = LogControl.ShowWarningProperty
DependencyProperty 为ShowWarning.
public static readonly DependencyProperty TimeFormatProperty
value = LogControl.TimeFormatProperty
DependencyProperty 为TimeFormat.