private static void AutoResizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var ctrl = d.FindLogicalChild<LogControl>(); var autoResize = (bool)e.NewValue; ctrl.SetColumnsWidth(autoResize); }
private static void AutoScrollChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var ctrl = d.FindLogicalChild<LogControl>(); var autoScroll = (bool)e.NewValue; ctrl._autoScroll = autoScroll; }
private static void MaxItemsCountChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { d.FindLogicalChild<LogControl>()._messages.MaxCount = (int)e.NewValue; }
private static void ShowChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var ctrl = d.FindLogicalChild<LogControl>(); var newValue = (bool)e.NewValue; if (e.Property == ShowDebugProperty) ctrl._showDebug = newValue; else if (e.Property == ShowErrorProperty) ctrl._showError = newValue; else if (e.Property == ShowInfoProperty) ctrl._showInfo = newValue; else if (e.Property == ShowWarningProperty) ctrl._showWarning = newValue; if (ctrl._view != null) ctrl._view.Refresh(); }
private static void ShowSourceNameColumnChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { d.FindLogicalChild<LogControl>().MessageGrid.Columns[0].Visibility = (bool)e.NewValue ? Visibility.Visible : Visibility.Collapsed; }