-
-
Notifications
You must be signed in to change notification settings - Fork 55
Samples
Jan Karger edited this page Jul 27, 2017
·
9 revisions
Directly in XAML
<simpleChildWindow:ChildWindow
IsOpen="{Binding IsChildWindowOpenOrNotProperty}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
Padding="15"
ChildWindowImage="Error"
Title="TestChild 1">
<Grid>
</Grid>
</simpleChildWindow:ChildWindow>
Or with the ChildWindowManager
private async void OpenAChildWindow_OnButtonClick(object sender, RoutedEventArgs e)
{
// opens a cool child window
await this.ShowChildWindowAsync(new CoolChildWindow() { IsModal = false });
}
A modal ChildWindow
uses by default the GrayBrush3
from MahApps for the OverlayBrush
. So the overlay hides the complete content. You can use a SolidColorBrush
with an opacity to make the overlay transparent.
<simpleChildWindow:ChildWindow.OverlayBrush>
<SolidColorBrush Opacity="0.8" Color="{StaticResource Gray2}" />
</simpleChildWindow:ChildWindow.OverlayBrush>