Skip to content
Jan Karger edited this page Jul 20, 2017 · 3 revisions

The ChildWindowManager static class contains several methods to show a child window.

The ShowChildWindowAsync methods shows the given child window on the MetroWindow dialog container or a Panel container in an asynchronous way.

public static Task ShowChildWindowAsync(
    this Window window,
    ChildWindow dialog,
    OverlayFillBehavior overlayFillBehavior = OverlayFillBehavior.WindowContent)
{ }

public static Task ShowChildWindowAsync(
    this Window window,
    ChildWindow dialog,
    Panel container)
{ }

It's also possible to get a result from the child window after closing it.

public static Task<TResult> ShowChildWindowAsync<TResult>(
    this Window window,
    ChildWindow dialog,
    OverlayFillBehavior overlayFillBehavior = OverlayFillBehavior.WindowContent)
{ }

public static Task<TResult> ShowChildWindowAsync<TResult>(
    this Window window,
    ChildWindow dialog,
    Panel container)
{ }

The OverlayFillBehavior parameter controls the fill behavior of the child window.

public enum OverlayFillBehavior
{
    /// <summary>
    /// The overlay covers the full window
    /// </summary>
    FullWindow,

    /// <summary>
    /// The overlay covers only then window content, so the window title bar is useable
    /// </summary>
    WindowContent
}