本文整理汇总了C#中System.Windows.DependencyObject.FindLogicalChild方法的典型用法代码示例。如果您正苦于以下问题:C# DependencyObject.FindLogicalChild方法的具体用法?C# DependencyObject.FindLogicalChild怎么用?C# DependencyObject.FindLogicalChild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.DependencyObject
的用法示例。
在下文中一共展示了DependencyObject.FindLogicalChild方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AutoResizeChanged
private static void AutoResizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var ctrl = d.FindLogicalChild<LogControl>();
var autoResize = (bool)e.NewValue;
ctrl.SetColumnsWidth(autoResize);
}
示例2: AutoScrollChanged
private static void AutoScrollChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var ctrl = d.FindLogicalChild<LogControl>();
var autoScroll = (bool)e.NewValue;
ctrl._autoScroll = autoScroll;
}
示例3: MaxItemsCountChanged
private static void MaxItemsCountChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
d.FindLogicalChild<LogControl>()._messages.MaxCount = (int)e.NewValue;
}
示例4: ShowChanged
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();
}
示例5: ShowSourceNameColumnChanged
private static void ShowSourceNameColumnChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
d.FindLogicalChild<LogControl>().MessageGrid.Columns[0].Visibility = (bool)e.NewValue ? Visibility.Visible : Visibility.Collapsed;
}