Skip to content

Instantly share code, notes, and snippets.

@Keboo
Last active August 24, 2017 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Keboo/a049e18ca5dd2c94447806187f193d51 to your computer and use it in GitHub Desktop.
Save Keboo/a049e18ca5dd2c94447806187f193d51 to your computer and use it in GitHub Desktop.
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