<ResourceDictionary
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:theme="clr-namespace:Ursa.Themes.Semi"
    xmlns:u="https://irihi.tech/ursa">
    
    <ControlTheme x:Key="{x:Type u:OverlayDialogHost}" TargetType="u:OverlayDialogHost">
        <Setter Property="OverlayMaskBrush" Value="{DynamicResource OverlayDialogMaskBrush}" />
    </ControlTheme>
    <ControlTheme x:Key="{x:Type u:DialogControl}" TargetType="u:DialogControl">
        <Setter Property="CornerRadius" Value="12"></Setter>
        <Setter Property="Template">
            <ControlTemplate TargetType="u:DialogControl">
                <Border
                    Padding="0"
                    Margin="4"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Classes="Shadow"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    ClipToBounds="True"
                    IsHitTestVisible="True"
                    Theme="{DynamicResource CardBorder}">
                    <Grid RowDefinitions="Auto, *">
                        <ContentPresenter
                            Name="PART_ContentPresenter"
                            Grid.Row="0"
                            Grid.RowSpan="2"
                            Content="{TemplateBinding Content}" />
                        <Grid Grid.Row="0" ColumnDefinitions="*, Auto">
                            <Panel
                                Name="{x:Static u:DialogControl.PART_TitleArea}"
                                Grid.Column="0"
                                Grid.ColumnSpan="2"
                                Background="Transparent" />
                            <Button
                                Name="{x:Static u:MessageBoxWindow.PART_CloseButton}"
                                Grid.Column="1"
                                Margin="0,24,24,0"
                                DockPanel.Dock="Right"
                                Theme="{DynamicResource CloseButton}" />
                        </Grid>
                    </Grid>
                </Border>
            </ControlTemplate>
        </Setter>
        <Style Selector="^:not(:modal) /template/ Panel#PART_TitleArea">
            <Setter Property="ContextFlyout">
                <MenuFlyout>
                    <MenuItem
                        Command="{Binding $parent[u:DialogControl].UpdateLayer}"
                        CommandParameter="{x:Static u:DialogLayerChangeType.BringForward}"
                        Header="Bring Forward">
                        <MenuItem.Icon>
                            <PathIcon
                                Width="12"
                                Height="12"
                                Data="{DynamicResource DialogArrangeBringForwardGlyph}" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem
                        Command="{Binding $parent[u:DialogControl].UpdateLayer}"
                        CommandParameter="{x:Static u:DialogLayerChangeType.BringToFront}"
                        Header="Bring To Front">
                        <MenuItem.Icon>
                            <PathIcon
                                Width="12"
                                Height="12"
                                Data="{DynamicResource DialogArrangeBringToFrontGlyph}" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem
                        Command="{Binding $parent[u:DialogControl].UpdateLayer}"
                        CommandParameter="{x:Static u:DialogLayerChangeType.SendBackward}"
                        Header="Send Backward">
                        <MenuItem.Icon>
                            <PathIcon
                                Width="12"
                                Height="12"
                                Data="{DynamicResource DialogArrangeSendBackwardGlyph}" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem
                        Command="{Binding $parent[u:DialogControl].UpdateLayer}"
                        CommandParameter="{x:Static u:DialogLayerChangeType.SendToBack}"
                        Header="Send To Back">
                        <MenuItem.Icon>
                            <PathIcon
                                Width="12"
                                Height="12"
                                Data="{DynamicResource DialogArrangeSendToBackGlyph}" />
                        </MenuItem.Icon>
                    </MenuItem>
                </MenuFlyout>
            </Setter>
        </Style>
    </ControlTheme>
    
    <ControlTheme x:Key="{x:Type u:DefaultDialogControl}" TargetType="u:DefaultDialogControl">
        <Setter Property="CornerRadius" Value="12"></Setter>
        <Setter Property="Template">
            <ControlTemplate TargetType="u:DefaultDialogControl">
                <Border
                    Padding="0"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Classes="Shadow"
                    CornerRadius="{TemplateBinding CornerRadius}"
                    ClipToBounds="True"
                    IsHitTestVisible="True"
                    Theme="{DynamicResource CardBorder}">
                    <Grid RowDefinitions="Auto, *, Auto">
                        <ContentPresenter
                            Name="PART_ContentPresenter"
                            Grid.Row="1"
                            Margin="24 8"
                            Content="{TemplateBinding Content}" />
                        <Grid Grid.Row="0" ColumnDefinitions="Auto, *, Auto">
                            <Panel
                                Name="{x:Static u:DialogControl.PART_TitleArea}"
                                Grid.Column="0"
                                Grid.ColumnSpan="3"
                                Background="Transparent" />
                            <PathIcon
                                Name="PART_Icon"
                                Grid.Column="0"
                                Margin="24 24 8 0"
                                Width="16"
                                VerticalAlignment="Center"
                                Height="16" />
                            <TextBlock
                                Name="PART_Title"
                                Grid.Column="1"
                                Margin="0 24 0 0 "
                                FontWeight="Bold"
                                FontSize="16"
                                TextWrapping="Wrap"
                                VerticalAlignment="Center"
                                IsHitTestVisible="False"
                                IsVisible="{TemplateBinding Title,
                                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                                Text="{TemplateBinding Title}" />
                            <Button
                                Name="{x:Static u:MessageBoxWindow.PART_CloseButton}"
                                Grid.Column="2"
                                Margin="0 24 24 0"
                                DockPanel.Dock="Right"
                                Theme="{DynamicResource CloseButton}" />
                        </Grid>
                        <StackPanel
                            Grid.Row="2"
                            Margin="24 0 24 24"
                            HorizontalAlignment="Right"
                            Orientation="Horizontal">
                            <Button
                                Name="{x:Static u:DefaultDialogControl.PART_CancelButton}"
                                Margin="8,0,0,0"
                                Classes="Tertiary"
                                Content="取消" />
                            <Button
                                Name="{x:Static u:DefaultDialogControl.PART_NoButton}"
                                Margin="8,0,0,0"
                                Classes="Danger"
                                Theme="{DynamicResource SolidButton}"
                                Content="否" />
                            <Button
                                Name="{x:Static u:DefaultDialogControl.PART_YesButton}"
                                Margin="8,0,0,0"
                                Classes="Primary"
                                Theme="{DynamicResource SolidButton}"
                                Content="是" />
                            <Button
                                Name="{x:Static u:DefaultDialogControl.PART_OKButton}"
                                Margin="8,0,0,0"
                                Classes="Primary"
                                Theme="{DynamicResource SolidButton}"
                                Content="确认" />
                        </StackPanel>
                    </Grid>
                </Border>
            </ControlTemplate>
        </Setter>
        <Style Selector="^[Mode=None]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="False"></Setter>
            </Style>
            <Style Selector="^ /template/ TextBlock#PART_Title">
                <Setter Property="Margin" Value="24 24 0 0"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>
        <Style Selector="^[Mode=Info]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="True"></Setter>
                <Setter Property="Data" Value="{DynamicResource DialogInformationIconGlyph}"></Setter>
                <Setter Property="Foreground" Value="{DynamicResource SemiBlue6}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>
        <Style Selector="^[Mode=Warning]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="True"></Setter>
                <Setter Property="Data" Value="{DynamicResource DialogWarningIconGlyph}"></Setter>
                <Setter Property="Foreground" Value="{DynamicResource SemiOrange6}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Warning"></Setter>
                <Setter Property="Theme" Value="{DynamicResource SolidButton}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Warning"></Setter>
                <Setter Property="Theme" Value="{DynamicResource SolidButton}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
                <Setter Property="Theme" Value="{DynamicResource SolidButton}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>
        <Style Selector="^[Mode=Error]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="True"></Setter>
                <Setter Property="Data" Value="{DynamicResource DialogErrorIconGlyph}"></Setter>
                <Setter Property="Foreground" Value="{DynamicResource SemiRed6}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>
        <Style Selector="^[Mode=Question]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="True"></Setter>
                <Setter Property="Data" Value="{DynamicResource DialogQuestionIconGlyph}"></Setter>
                <Setter Property="Foreground" Value="{DynamicResource SemiBlue6}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>
        <Style Selector="^[Mode=Success]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="True"></Setter>
                <Setter Property="Data" Value="{DynamicResource DialogSuccessIconGlyph}"></Setter>
                <Setter Property="Foreground" Value="{DynamicResource SemiGreen6}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Success"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Success"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>

        <Style Selector="^:not(:modal) /template/ Panel#PART_TitleArea">
            <Setter Property="ContextFlyout">
                <MenuFlyout>
                    <MenuItem
                        Command="{Binding $parent[u:DialogControl].UpdateLayer}"
                        CommandParameter="{x:Static u:DialogLayerChangeType.BringForward}"
                        Header="Bring Forward">
                        <MenuItem.Icon>
                            <PathIcon
                                Width="12"
                                Height="12"
                                Data="{DynamicResource DialogArrangeBringForwardGlyph}" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem
                        Command="{Binding $parent[u:DialogControl].UpdateLayer}"
                        CommandParameter="{x:Static u:DialogLayerChangeType.BringToFront}"
                        Header="Bring To Front">
                        <MenuItem.Icon>
                            <PathIcon
                                Width="12"
                                Height="12"
                                Data="{DynamicResource DialogArrangeBringToFrontGlyph}" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem
                        Command="{Binding $parent[u:DialogControl].UpdateLayer}"
                        CommandParameter="{x:Static u:DialogLayerChangeType.SendBackward}"
                        Header="Send Backward">
                        <MenuItem.Icon>
                            <PathIcon
                                Width="12"
                                Height="12"
                                Data="{DynamicResource DialogArrangeSendBackwardGlyph}" />
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem
                        Command="{Binding $parent[u:DialogControl].UpdateLayer}"
                        CommandParameter="{x:Static u:DialogLayerChangeType.SendToBack}"
                        Header="Send To Back">
                        <MenuItem.Icon>
                            <PathIcon
                                Width="12"
                                Height="12"
                                Data="{DynamicResource DialogArrangeSendToBackGlyph}" />
                        </MenuItem.Icon>
                    </MenuItem>
                </MenuFlyout>
            </Setter>
        </Style>
    </ControlTheme>

    <ControlTheme x:Key="{x:Type u:DialogWindow}" TargetType="u:DialogWindow">
        <Setter Property="Title" Value="{x:Null}" />
        <Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" />
        <Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource WindowDefaultBackground}" />
        <Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
        <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
        <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
        <Setter Property="Padding" Value="48 24" />
        <Setter Property="SizeToContent" Value="WidthAndHeight" />
        <Setter Property="WindowStartupLocation" Value="CenterOwner" />
        <Setter Property="ExtendClientAreaTitleBarHeightHint" Value="1" />
        <Setter Property="ExtendClientAreaToDecorationsHint" Value="True" />
        <Setter Property="ExtendClientAreaChromeHints" Value="SystemChrome" />
        <Setter Property="SystemDecorations">
            <OnPlatform>
                <OnPlatform.Windows>
                    <SystemDecorations>Full</SystemDecorations>
                </OnPlatform.Windows>
                <OnPlatform.Default>
                    <SystemDecorations>BorderOnly</SystemDecorations>
                </OnPlatform.Default>
            </OnPlatform>
        </Setter>
        <Setter Property="CanResize" Value="False" />
        <Setter Property="Template">
            <ControlTemplate TargetType="u:DialogWindow">
                <Panel>
                    <Border Name="PART_TransparencyFallback" IsHitTestVisible="False" />
                    <Border Background="{TemplateBinding Background}" IsHitTestVisible="False" />
                    <Panel Margin="{TemplateBinding WindowDecorationMargin}" Background="Transparent" />
                    <ChromeOverlayLayer />
                    <Grid RowDefinitions="Auto, *">
                        <ContentPresenter
                            Grid.Row="0"
                            Grid.RowSpan="2"
                            Content="{TemplateBinding Content}" />
                        <Grid Grid.Row="0" ColumnDefinitions="*, Auto">
                            <TextBlock
                                Grid.Column="0"
                                Margin="24, 24,0,0"
                                FontSize="14"
                                FontWeight="Bold"
                                Text="{TemplateBinding Title}"
                                TextTrimming="CharacterEllipsis"
                                TextWrapping="NoWrap" />
                            <Button
                                Name="{x:Static u:MessageBoxWindow.PART_CloseButton}"
                                Grid.Column="1"
                                Margin="0,24,24,0"
                                Theme="{DynamicResource CloseButton}" />
                        </Grid>
                    </Grid>
                </Panel>
            </ControlTemplate>
        </Setter>
    </ControlTheme>

    <ControlTheme x:Key="{x:Type u:DefaultDialogWindow}" TargetType="u:DefaultDialogWindow">
        <Setter Property="Title" Value="{x:Null}" />
        <Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" />
        <Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource WindowDefaultBackground}" />
        <Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
        <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
        <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
        <Setter Property="Padding" Value="48 24" />
        <Setter Property="SizeToContent" Value="WidthAndHeight" />
        <Setter Property="WindowStartupLocation" Value="CenterOwner" />
        <Setter Property="ExtendClientAreaTitleBarHeightHint" Value="1" />
        <Setter Property="ExtendClientAreaToDecorationsHint" Value="True" />
        <Setter Property="ExtendClientAreaChromeHints" Value="SystemChrome" />
        <Setter Property="SystemDecorations">
            <OnPlatform>
                <OnPlatform.Windows>
                    <SystemDecorations>Full</SystemDecorations>
                </OnPlatform.Windows>
                <OnPlatform.Default>
                    <SystemDecorations>BorderOnly</SystemDecorations>
                </OnPlatform.Default>
            </OnPlatform>
        </Setter>
        <Setter Property="CanResize" Value="False" />
        <Setter Property="Template">
            <ControlTemplate TargetType="u:DefaultDialogWindow">
                <Panel>
                    <Border Name="PART_TransparencyFallback" IsHitTestVisible="False" />
                    <Border Background="{TemplateBinding Background}" IsHitTestVisible="False" />
                    <Panel Margin="{TemplateBinding WindowDecorationMargin}" Background="Transparent" />
                    <ChromeOverlayLayer />
                    <Grid RowDefinitions="Auto, *, Auto">
                        <ContentPresenter
                            Name="PART_ContentPresenter"
                            Grid.Row="1"
                            Margin="24 8"
                            Content="{TemplateBinding Content}" />
                        <Grid Grid.Row="0" ColumnDefinitions="Auto, *, Auto">
                            <Panel
                                Name="{x:Static u:DialogControl.PART_TitleArea}"
                                Grid.Column="0"
                                Grid.ColumnSpan="3"
                                Background="Transparent" />
                            <PathIcon
                                Name="PART_Icon"
                                Grid.Column="0"
                                Margin="24 24 8 0"
                                Width="16"
                                VerticalAlignment="Center"
                                Height="16" />
                            <TextBlock
                                Name="PART_Title"
                                Grid.Column="1"
                                Margin="0 24 0 0 "
                                FontWeight="Bold"
                                FontSize="16"
                                TextWrapping="Wrap"
                                VerticalAlignment="Center"
                                IsHitTestVisible="False"
                                IsVisible="{TemplateBinding Title,
                                                            Converter={x:Static ObjectConverters.IsNotNull}}"
                                Text="{TemplateBinding Title}" />
                            <Button
                                Name="{x:Static u:MessageBoxWindow.PART_CloseButton}"
                                Grid.Column="2"
                                Margin="0 24 24 0"
                                DockPanel.Dock="Right"
                                Theme="{DynamicResource CloseButton}" />
                        </Grid>
                        <StackPanel
                            Grid.Row="2"
                            Margin="24 0 24 24"
                            HorizontalAlignment="Right"
                            Orientation="Horizontal">
                            <Button
                                Name="{x:Static u:DefaultDialogControl.PART_CancelButton}"
                                Margin="8,0,0,0"
                                Classes="Tertiary"
                                Content="取消" />
                            <Button
                                Name="{x:Static u:DefaultDialogControl.PART_NoButton}"
                                Margin="8,0,0,0"
                                Classes="Danger"
                                Theme="{DynamicResource SolidButton}"
                                Content="否" />
                            <Button
                                Name="{x:Static u:DefaultDialogControl.PART_YesButton}"
                                Margin="8,0,0,0"
                                Classes="Primary"
                                Theme="{DynamicResource SolidButton}"
                                Content="是" />
                            <Button
                                Name="{x:Static u:DefaultDialogControl.PART_OKButton}"
                                Margin="8,0,0,0"
                                Classes="Primary"
                                Theme="{DynamicResource SolidButton}"
                                Content="确认" />
                        </StackPanel>
                    </Grid>
                </Panel>
            </ControlTemplate>
        </Setter>
        <Style Selector="^[Mode=None]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="False"></Setter>
            </Style>
            <Style Selector="^ /template/ TextBlock#PART_Title">
                <Setter Property="Margin" Value="24 24 0 0"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>
        <Style Selector="^[Mode=Info]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="True"></Setter>
                <Setter Property="Data" Value="{DynamicResource DialogInformationIconGlyph}"></Setter>
                <Setter Property="Foreground" Value="{DynamicResource SemiBlue6}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>
        <Style Selector="^[Mode=Warning]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="True"></Setter>
                <Setter Property="Data" Value="{DynamicResource DialogWarningIconGlyph}"></Setter>
                <Setter Property="Foreground" Value="{DynamicResource SemiOrange6}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Warning"></Setter>
                <Setter Property="Theme" Value="{DynamicResource SolidButton}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Warning"></Setter>
                <Setter Property="Theme" Value="{DynamicResource SolidButton}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
                <Setter Property="Theme" Value="{DynamicResource SolidButton}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>
        <Style Selector="^[Mode=Error]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="True"></Setter>
                <Setter Property="Data" Value="{DynamicResource DialogErrorIconGlyph}"></Setter>
                <Setter Property="Foreground" Value="{DynamicResource SemiRed6}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>
        <Style Selector="^[Mode=Question]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="True"></Setter>
                <Setter Property="Data" Value="{DynamicResource DialogQuestionIconGlyph}"></Setter>
                <Setter Property="Foreground" Value="{DynamicResource SemiBlue6}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Primary"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>
        <Style Selector="^[Mode=Success]">
            <Style Selector="^ /template/ PathIcon#PART_Icon">
                <Setter Property="IsVisible" Value="True"></Setter>
                <Setter Property="Data" Value="{DynamicResource DialogSuccessIconGlyph}"></Setter>
                <Setter Property="Foreground" Value="{DynamicResource SemiGreen6}"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_OKButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Success"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_YesButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Success"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_NoButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Danger"></Setter>
            </Style>
            <Style Selector="^ /template/ Button#PART_CancelButton">
                <Setter Property="theme:ClassHelper.Classes" Value="Tertiary"></Setter>
            </Style>
        </Style>
    </ControlTheme>
</ResourceDictionary>
