本文整理汇总了C#中System.Windows.Window.FindChildInVisualTree方法的典型用法代码示例。如果您正苦于以下问题:C# Window.FindChildInVisualTree方法的具体用法?C# Window.FindChildInVisualTree怎么用?C# Window.FindChildInVisualTree使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Window
的用法示例。
在下文中一共展示了Window.FindChildInVisualTree方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowDialogModal
/// <summary>
/// Shows the dialog modal.
/// </summary>
/// <param name="owner">A <see cref="Window" /> that contains <see cref="DialogControlContainer" /> in its visual tree.</param>
/// <param name="caption">The caption.</param>
/// <param name="button">The button to display.</param>
/// <param name="icon">The icon to display.</param>
/// <param name="defaultResult">The default result.</param>
/// <returns></returns>
public virtual MessageBoxResult ShowDialogModal(Window owner, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult)
{
return ShowDialogModal(owner.FindChildInVisualTree<DialogControlContainer>(), caption, button, icon, defaultResult);
}
示例2: ShowDialog
public virtual void ShowDialog(Window window)
{
ShowDialog(window.FindChildInVisualTree<DialogControlContainer>(true));
}
示例3: ShowDialogModal
public virtual bool? ShowDialogModal(Window window)
{
return ShowDialogModal(window.FindChildInVisualTree<DialogControlContainer>(true));
}
示例4: Show
/// <summary>
/// Displays a message box in front of the specified window.
/// </summary>
/// <param name="owner">A <see cref="Window" /> that contains <see cref="DialogControlContainer" /> in its visual tree.</param>
/// <param name="messageBoxText">The message box text.</param>
/// <param name="caption">The caption.</param>
/// <param name="button">The button to display.</param>
/// <param name="icon">The icon to display.</param>
/// <param name="defaultResult">The default result.</param>
/// <returns></returns>
/// <exception cref="System.ArgumentNullException">owner</exception>
public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult)
{
return Show(owner.FindChildInVisualTree<DialogControlContainer>(), messageBoxText, caption, button, icon, defaultResult);
}