<Window    x:Class="ExampleCore.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:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:local="clr-namespace:ExampleCore"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
    xmlns:prism="http://prismlibrary.com/"
    Title="MainWindow"
    Width="800"
    Height="450"
    d:DataContext="{d:DesignInstance local:MainWindowViewModel}"
    prism:ViewModelLocator.AutoWireViewModel="True"
    Background="{DynamicResource MaterialDesignPaper}"
    FontFamily="{DynamicResource MaterialDesignFont}"
    TextElement.FontSize="13"
    TextElement.FontWeight="Regular"
    TextElement.Foreground="{DynamicResource MaterialDesignBody}"
    TextOptions.TextFormattingMode="Ideal"
    TextOptions.TextRenderingMode="Auto"
    mc:Ignorable="d">
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="ContentRendered">
            <i:InvokeCommandAction Command="{Binding UpdateCommand}" CommandParameter="True" />
        </i:EventTrigger>
    </i:Interaction.Triggers>
    <md:DialogHost IsOpen="{Binding ShowRestartAppDialog}">
        <md:DialogHost.DialogContent>
            <Grid Margin="10">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <TextBlock
                    Grid.Row="0"
                    Grid.Column="0"
                    Grid.ColumnSpan="2"
                    Text="The update was installed successful. Do you want to restart?" />
                <Button
                    Grid.Row="1"
                    Grid.Column="0"
                    Command="{Binding RestartAppDialogCommand}"
                    IsCancel="False"
                    Style="{StaticResource MaterialDesignFlatButton}">
                    <Button.CommandParameter>
                        <system:Boolean xmlns:system="clr-namespace:System;assembly=mscorlib">
                            True
                        </system:Boolean>
                    </Button.CommandParameter>
                    YES
                </Button>
                <Button
                    Grid.Row="1"
                    Grid.Column="1"
                    Command="{Binding RestartAppDialogCommand}"
                    IsCancel="True"
                    Style="{StaticResource MaterialDesignFlatButton}">
                    <Button.CommandParameter>
                        <system:Boolean xmlns:system="clr-namespace:System;assembly=mscorlib">
                            False
                        </system:Boolean>
                    </Button.CommandParameter>
                    NO
                </Button>
            </Grid>
        </md:DialogHost.DialogContent>
        <DockPanel>
            <md:Snackbar
                Margin="10,0"
                HorizontalAlignment="Stretch"
                DockPanel.Dock="Bottom"
                MessageQueue="{Binding MessageQueue}" />
            <StackPanel>
                <Button
                    Height="45"
                    Margin="10"
                    Command="{Binding UpdateCommand}"
                    CommandParameter="False"
                    Content="Update"
                    FontSize="24" />
                <Button Content="Open File Dialog" Command="{Binding OpenFileDialogCommand}" />
                <TextBlock
                    Margin="20"
                    HorizontalAlignment="Center"
                    FontSize="60"
                    RenderTransformOrigin="0.5,0.5"
                    Text=":-)">
                    <TextBlock.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform />
                            <SkewTransform />
                            <RotateTransform Angle="90" />
                            <TranslateTransform />
                        </TransformGroup>
                    </TextBlock.RenderTransform>
                </TextBlock>
            </StackPanel>
        </DockPanel>
    </md:DialogHost>
</Window>