Project Description
Multi-window aware versions of key Silverlight toolkit controls including ChildWindow and ContextMenu for building desktop applications using Silverlight 5.
Available as a Nuget package.

Right click the sample application below to install it on your desktop and try the multi-window controls:

You need to install Microsoft Silverlight to view this content. Get Silverlight!
Get Microsoft Silverlight



Showing a ChildWindow in a non-main/secondary window:

    var child = new ChildWindow { Title = "Child Window" };
    child.SetWindow(Window.GetWindow(this));
    child.Show();
Adding a web style (constrained to parent window) ContextMenu:

    <TextBlock Text="Right click on me to show the context menu">
            <multiwindow:ContextMenuService.ContextMenu>
                <multiwindow:ContextMenu>
                    <multiwindow:MenuItem Header="Menu Item"/>
                </multiwindow:ContextMenu>
            </multiwindow:ContextMenuService.ContextMenu>
    </TextBlock>

Adding a desktop style (can show outside of parent window) ContextMenuWindow:

    <TextBlock Text="Right click on me to show the context menu">
            <multiwindow:ContextMenuService.ContextMenu>
                <multiwindow:ContextMenuWindow>
                    <multiwindow:MenuItem Header="Menu Item"/>
                </multiwindow:ContextMenuWindow>
            </multiwindow:ContextMenuService.ContextMenu>
    </TextBlock>

In desktop mode the window can pop outside of the parent window.



Showing a native popup:

    new PopupWindow
    {
        Width = 160,
        Height = 160,
        HorizontalOffset = 0,
        VerticalOffset = 0,
        Child = new TextBlock { Text = "Hello world" },
        PlacementTarget = element,
        Placement = PlacementMode.Right,
        StaysOpen = false,
        IsOpen = true
    };

Showing a modal dialog:
    modalWindow.ShowDialog();

Last edited May 14, 2013 at 6:52 AM by ptrelford, version 16