Skip to content

Instantly share code, notes, and snippets.

@Keboo
Last active Aug 24, 2017
Embed
What would you like to do?
MDIX DialogHost example
<Window x:Class="Example.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
mc:Ignorable="d"
Background="{DynamicResource MaterialDesignPaper}"
Style="{StaticResource MaterialDesignWindow}"
Title="Example Dialog Host" Height="600" Width="800">
<Window.Content>
<md:DialogHost CloseOnClickAway="True">
<md:DialogHost.DialogContent>
<Grid Background="Fuchsia" Margin="50">
<TextBlock Text="My dialog content" /></TextBlock>
</Grid>
</md:DialogHost.DialogContent
<Button Content="Show Dialog" Command="{x:Static md:DialogHost.OpenDialogCommand}" HorizontalAlignment="Center" VerticalAlignment="Center" />
</md:DialogHost>
</Window.Content>
</Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment