<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
    xmlns:coreControls="using:Wino.Core.UWP.Controls"
    xmlns:local="using:Microsoft.UI.Xaml.Controls"
    xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives">
    <ResourceDictionary.ThemeDictionaries>
        <ResourceDictionary x:Key="Light">
            <SolidColorBrush x:Key="InfoBarCustomInformationalBackground">#74b9ff</SolidColorBrush>

            <StaticResource x:Key="InfoBarErrorSeverityBackgroundBrush" ResourceKey="SystemFillColorCriticalBackgroundBrush" />
            <StaticResource x:Key="InfoBarWarningSeverityBackgroundBrush" ResourceKey="SystemFillColorCautionBackgroundBrush" />
            <StaticResource x:Key="InfoBarSuccessSeverityBackgroundBrush" ResourceKey="SystemFillColorSuccessBackgroundBrush" />
            <StaticResource x:Key="InfoBarInformationalSeverityBackgroundBrush" ResourceKey="InfoBarCustomInformationalBackground" />

            <StaticResource x:Key="InfoBarErrorSeverityIconBackground" ResourceKey="SystemFillColorCriticalBrush" />
            <StaticResource x:Key="InfoBarWarningSeverityIconBackground" ResourceKey="SystemFillColorCautionBrush" />
            <StaticResource x:Key="InfoBarSuccessSeverityIconBackground" ResourceKey="SystemFillColorSuccessBrush" />
            <StaticResource x:Key="InfoBarInformationalSeverityIconBackground" ResourceKey="SystemFillColorAttentionBrush" />

            <StaticResource x:Key="InfoBarErrorSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
            <StaticResource x:Key="InfoBarWarningSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
            <StaticResource x:Key="InfoBarSuccessSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
            <StaticResource x:Key="InfoBarInformationalSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />

            <StaticResource x:Key="InfoBarTitleForeground" ResourceKey="TextFillColorPrimaryBrush" />
            <StaticResource x:Key="InfoBarMessageForeground" ResourceKey="TextFillColorPrimaryBrush" />
            <StaticResource x:Key="InfoBarHyperlinkButtonForeground" ResourceKey="AccentTextFillColorPrimaryBrush" />

            <StaticResource x:Key="InfoBarBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
            <Thickness x:Key="InfoBarBorderThickness">1</Thickness>
        </ResourceDictionary>

        <ResourceDictionary x:Key="Dark">
            <SolidColorBrush x:Key="InfoBarCustomInformationalBackground">#3867d6</SolidColorBrush>

            <StaticResource x:Key="InfoBarErrorSeverityBackgroundBrush" ResourceKey="SystemFillColorCriticalBackgroundBrush" />
            <StaticResource x:Key="InfoBarWarningSeverityBackgroundBrush" ResourceKey="SystemFillColorCautionBackgroundBrush" />
            <StaticResource x:Key="InfoBarSuccessSeverityBackgroundBrush" ResourceKey="SystemFillColorSuccessBackgroundBrush" />
            <StaticResource x:Key="InfoBarInformationalSeverityBackgroundBrush" ResourceKey="InfoBarCustomInformationalBackground" />

            <StaticResource x:Key="InfoBarErrorSeverityIconBackground" ResourceKey="SystemFillColorCriticalBrush" />
            <StaticResource x:Key="InfoBarWarningSeverityIconBackground" ResourceKey="SystemFillColorCautionBrush" />
            <StaticResource x:Key="InfoBarSuccessSeverityIconBackground" ResourceKey="SystemFillColorSuccessBrush" />
            <StaticResource x:Key="InfoBarInformationalSeverityIconBackground" ResourceKey="SystemFillColorAttentionBrush" />

            <StaticResource x:Key="InfoBarErrorSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
            <StaticResource x:Key="InfoBarWarningSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
            <StaticResource x:Key="InfoBarSuccessSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />
            <StaticResource x:Key="InfoBarInformationalSeverityIconForeground" ResourceKey="TextFillColorInverseBrush" />

            <StaticResource x:Key="InfoBarTitleForeground" ResourceKey="TextFillColorPrimaryBrush" />
            <StaticResource x:Key="InfoBarMessageForeground" ResourceKey="TextFillColorPrimaryBrush" />
            <StaticResource x:Key="InfoBarHyperlinkButtonForeground" ResourceKey="AccentTextFillColorPrimaryBrush" />

            <StaticResource x:Key="InfoBarBorderBrush" ResourceKey="CardStrokeColorDefaultBrush" />
            <Thickness x:Key="InfoBarBorderThickness">1</Thickness>
        </ResourceDictionary>

        <ResourceDictionary x:Key="HighContrast">
            <SolidColorBrush x:Key="InfoBarErrorSeverityBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}" />
            <SolidColorBrush x:Key="InfoBarWarningSeverityBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}" />
            <SolidColorBrush x:Key="InfoBarSuccessSeverityBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}" />
            <SolidColorBrush x:Key="InfoBarInformationalSeverityBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}" />

            <StaticResource x:Key="InfoBarErrorSeverityIconBackground" ResourceKey="SystemColorHighlightColor" />
            <StaticResource x:Key="InfoBarWarningSeverityIconBackground" ResourceKey="SystemColorHighlightColor" />
            <StaticResource x:Key="InfoBarSuccessSeverityIconBackground" ResourceKey="SystemColorHighlightColor" />
            <StaticResource x:Key="InfoBarInformationalSeverityIconBackground" ResourceKey="SystemColorHighlightColor" />

            <StaticResource x:Key="InfoBarErrorSeverityIconForeground" ResourceKey="SystemColorHighlightTextColor" />
            <StaticResource x:Key="InfoBarWarningSeverityIconForeground" ResourceKey="SystemColorHighlightTextColor" />
            <StaticResource x:Key="InfoBarSuccessSeverityIconForeground" ResourceKey="SystemColorHighlightTextColor" />
            <StaticResource x:Key="InfoBarInformationalSeverityIconForeground" ResourceKey="SystemColorHighlightTextColor" />

            <StaticResource x:Key="InfoBarTitleForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
            <StaticResource x:Key="InfoBarMessageForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
            <StaticResource x:Key="InfoBarHyperlinkButtonForeground" ResourceKey="SystemControlHyperlinkTextBrush" />

            <StaticResource x:Key="InfoBarBorderBrush" ResourceKey="SystemControlTransientBorderBrush" />
            <Thickness x:Key="InfoBarBorderThickness">2</Thickness>
        </ResourceDictionary>
    </ResourceDictionary.ThemeDictionaries>

    <x:Double x:Key="InfoBarTitleFontSize">14</x:Double>
    <FontWeight x:Key="InfoBarTitleFontWeight">SemiBold</FontWeight>

    <x:Double x:Key="InfoBarMessageFontSize">14</x:Double>
    <FontWeight x:Key="InfoBarMessageFontWeight">Normal</FontWeight>

    <x:Double x:Key="InfoBarMinHeight">48</x:Double>

    <x:Double x:Key="InfoBarCloseButtonSize">38</x:Double>
    <x:Double x:Key="InfoBarCloseButtonGlyphSize">16</x:Double>

    <!--  This negative margin makes the link visually line up with the title/message  -->
    <Thickness x:Key="InfoBarHyperlinkButtonMargin">-12,0,0,0</Thickness>

    <x:String x:Key="InfoBarIconBackgroundGlyph">&#xF136;</x:String>
    <x:String x:Key="InfoBarInformationalIconGlyph">&#xF13F;</x:String>
    <x:String x:Key="InfoBarErrorIconGlyph">&#xF13D;</x:String>
    <x:String x:Key="InfoBarWarningIconGlyph">&#xF13C;</x:String>
    <x:String x:Key="InfoBarSuccessIconGlyph">&#xF13E;</x:String>

    <Thickness x:Key="InfoBarContentRootPadding">16,0,0,0</Thickness>

    <Thickness x:Key="InfoBarIconMargin">0,16,14,16</Thickness>
    <x:Double x:Key="InfoBarIconFontSize">16</x:Double>

    <Thickness x:Key="InfoBarPanelMargin">0,0,16,0</Thickness>
    <Thickness x:Key="InfoBarPanelHorizontalOrientationPadding">0,0,0,0</Thickness>
    <Thickness x:Key="InfoBarPanelVerticalOrientationPadding">0,14,0,18</Thickness>

    <Thickness x:Key="InfoBarTitleHorizontalOrientationMargin">0,14,0,0</Thickness>
    <Thickness x:Key="InfoBarTitleVerticalOrientationMargin">0,14,0,0</Thickness>

    <Thickness x:Key="InfoBarMessageHorizontalOrientationMargin">12,14,0,0</Thickness>
    <Thickness x:Key="InfoBarMessageVerticalOrientationMargin">0,4,0,0</Thickness>

    <Thickness x:Key="InfoBarActionHorizontalOrientationMargin">16,8,0,0</Thickness>
    <Thickness x:Key="InfoBarActionVerticalOrientationMargin">0,12,0,0</Thickness>

    <Symbol x:Key="InfoBarCloseButtonSymbol">Cancel</Symbol>

    <Style
        x:Key="InfoBarCloseButtonStyle"
        BasedOn="{StaticResource DefaultButtonStyle}"
        TargetType="Button">
        <Style.Setters>
            <Setter Property="Width" Value="{StaticResource InfoBarCloseButtonSize}" />
            <Setter Property="Height" Value="{StaticResource InfoBarCloseButtonSize}" />
            <Setter Property="VerticalAlignment" Value="Top" />
            <Setter Property="Margin" Value="5" />
        </Style.Setters>
    </Style>

    <Style TargetType="coreControls:WinoInfoBar">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="CloseButtonStyle" Value="{StaticResource InfoBarCloseButtonStyle}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="{ThemeResource InfoBarBorderBrush}" />
        <Setter Property="BorderThickness" Value="{ThemeResource InfoBarBorderThickness}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="coreControls:WinoInfoBar">
                    <Border
                        x:Name="ContentRoot"
                        VerticalAlignment="Top"
                        contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
                        Background="{ThemeResource InfoBarInformationalSeverityBackgroundBrush}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <!--  Background is used here so that it overrides the severity status color if set.  -->
                        <Grid
                            MinHeight="{ThemeResource InfoBarMinHeight}"
                            Padding="{StaticResource InfoBarContentRootPadding}"
                            HorizontalAlignment="Stretch"
                            contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
                            Background="{TemplateBinding Background}">

                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <!--  Icon  -->
                                <ColumnDefinition Width="*" />
                                <!--  Title, message, and action  -->
                                <ColumnDefinition Width="Auto" />
                                <!--  Close button  -->
                            </Grid.ColumnDefinitions>

                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>

                            <Grid x:Name="StandardIconArea" Visibility="Collapsed">

                                <TextBlock
                                    x:Name="IconBackground"
                                    Grid.Column="0"
                                    Margin="{StaticResource InfoBarIconMargin}"
                                    VerticalAlignment="Top"
                                    AutomationProperties.AccessibilityView="Raw"
                                    FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                    FontSize="{StaticResource InfoBarIconFontSize}"
                                    Foreground="{ThemeResource InfoBarInformationalSeverityIconBackground}"
                                    Text="{StaticResource InfoBarIconBackgroundGlyph}" />

                                <TextBlock
                                    x:Name="StandardIcon"
                                    Grid.Column="0"
                                    Margin="{StaticResource InfoBarIconMargin}"
                                    VerticalAlignment="Top"
                                    FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                    FontSize="{StaticResource InfoBarIconFontSize}"
                                    Foreground="{ThemeResource InfoBarInformationalSeverityIconForeground}"
                                    Text="{StaticResource InfoBarInformationalIconGlyph}" />
                            </Grid>

                            <Viewbox
                                x:Name="UserIconBox"
                                Grid.Column="0"
                                MaxWidth="{ThemeResource InfoBarIconFontSize}"
                                MaxHeight="{ThemeResource InfoBarIconFontSize}"
                                Margin="{ThemeResource InfoBarIconMargin}"
                                VerticalAlignment="Top"
                                Child="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.IconElement}"
                                Visibility="Collapsed" />

                            <primitives:InfoBarPanel
                                Grid.Column="1"
                                Margin="{StaticResource InfoBarPanelMargin}"
                                HorizontalOrientationPadding="{StaticResource InfoBarPanelHorizontalOrientationPadding}"
                                VerticalOrientationPadding="{StaticResource InfoBarPanelVerticalOrientationPadding}">

                                <TextBlock
                                    x:Name="Title"
                                    primitives:InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarTitleHorizontalOrientationMargin}"
                                    primitives:InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarTitleVerticalOrientationMargin}"
                                    AutomationProperties.LandmarkType="Navigation"
                                    FontSize="{StaticResource InfoBarTitleFontSize}"
                                    FontWeight="{StaticResource InfoBarTitleFontWeight}"
                                    Foreground="{ThemeResource InfoBarTitleForeground}"
                                    Text="{TemplateBinding Title}"
                                    TextWrapping="WrapWholeWords" />

                                <TextBlock
                                    x:Name="Message"
                                    primitives:InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarMessageHorizontalOrientationMargin}"
                                    primitives:InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarMessageVerticalOrientationMargin}"
                                    FontSize="{StaticResource InfoBarMessageFontSize}"
                                    FontWeight="{StaticResource InfoBarMessageFontWeight}"
                                    Foreground="{ThemeResource InfoBarMessageForeground}"
                                    Text="{TemplateBinding Message}"
                                    TextWrapping="WrapWholeWords" />

                                <ContentPresenter
                                    VerticalAlignment="Top"
                                    primitives:InfoBarPanel.HorizontalOrientationMargin="{StaticResource InfoBarActionHorizontalOrientationMargin}"
                                    primitives:InfoBarPanel.VerticalOrientationMargin="{StaticResource InfoBarActionVerticalOrientationMargin}"
                                    Content="{TemplateBinding ActionButton}">

                                    <ContentPresenter.Resources>
                                        <Style BasedOn="{StaticResource DefaultHyperlinkButtonStyle}" TargetType="HyperlinkButton">
                                            <Style.Setters>
                                                <Setter Property="Margin" Value="{StaticResource InfoBarHyperlinkButtonMargin}" />
                                                <Setter Property="Foreground" Value="{ThemeResource InfoBarHyperlinkButtonForeground}" />
                                            </Style.Setters>
                                        </Style>
                                    </ContentPresenter.Resources>
                                </ContentPresenter>

                            </primitives:InfoBarPanel>

                            <ContentPresenter
                                Grid.Row="0"
                                Grid.Column="1"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}" />

                            <Button
                                Name="CloseButton"
                                Grid.Column="2"
                                Command="{TemplateBinding CloseButtonCommand}"
                                CommandParameter="{TemplateBinding CloseButtonCommandParameter}"
                                Style="{TemplateBinding CloseButtonStyle}">

                                <Button.Resources>
                                    <ResourceDictionary>
                                        <ResourceDictionary.ThemeDictionaries>
                                            <ResourceDictionary x:Key="Default">
                                                <StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground" />
                                                <StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver" />
                                                <StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed" />
                                                <StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled" />
                                                <StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground" />
                                                <StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver" />
                                                <StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed" />
                                                <StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled" />
                                                <StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush" />
                                                <StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver" />
                                                <StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed" />
                                                <StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled" />
                                            </ResourceDictionary>

                                            <ResourceDictionary x:Key="HighContrast">
                                                <StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground" />
                                                <StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver" />
                                                <StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed" />
                                                <StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled" />
                                                <StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground" />
                                                <StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver" />
                                                <StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed" />
                                                <StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled" />
                                                <StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush" />
                                                <StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver" />
                                                <StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed" />
                                                <StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled" />
                                            </ResourceDictionary>

                                            <ResourceDictionary x:Key="Light">
                                                <StaticResource x:Key="ButtonBackground" ResourceKey="AppBarButtonBackground" />
                                                <StaticResource x:Key="ButtonBackgroundPointerOver" ResourceKey="AppBarButtonBackgroundPointerOver" />
                                                <StaticResource x:Key="ButtonBackgroundPressed" ResourceKey="AppBarButtonBackgroundPressed" />
                                                <StaticResource x:Key="ButtonBackgroundDisabled" ResourceKey="AppBarButtonBackgroundDisabled" />
                                                <StaticResource x:Key="ButtonForeground" ResourceKey="AppBarButtonForeground" />
                                                <StaticResource x:Key="ButtonForegroundPointerOver" ResourceKey="AppBarButtonForegroundPointerOver" />
                                                <StaticResource x:Key="ButtonForegroundPressed" ResourceKey="AppBarButtonForegroundPressed" />
                                                <StaticResource x:Key="ButtonForegroundDisabled" ResourceKey="AppBarButtonForegroundDisabled" />
                                                <StaticResource x:Key="ButtonBorderBrush" ResourceKey="AppBarButtonBorderBrush" />
                                                <StaticResource x:Key="ButtonBorderBrushPointerOver" ResourceKey="AppBarButtonBorderBrushPointerOver" />
                                                <StaticResource x:Key="ButtonBorderBrushPressed" ResourceKey="AppBarButtonBorderBrushPressed" />
                                                <StaticResource x:Key="ButtonBorderBrushDisabled" ResourceKey="AppBarButtonBorderBrushDisabled" />
                                            </ResourceDictionary>
                                        </ResourceDictionary.ThemeDictionaries>
                                    </ResourceDictionary>
                                </Button.Resources>

                                <Viewbox
                                    Width="{StaticResource InfoBarCloseButtonGlyphSize}"
                                    Height="{StaticResource InfoBarCloseButtonGlyphSize}"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center">
                                    <SymbolIcon Symbol="{StaticResource InfoBarCloseButtonSymbol}" />
                                </Viewbox>
                            </Button>
                        </Grid>

                        <VisualStateManager.VisualStateGroups>

                            <VisualStateGroup x:Name="SeverityLevels">
                                <VisualState x:Name="Informational">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarInformationalSeverityBackgroundBrush}" />
                                        <Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarInformationalSeverityIconBackground}" />
                                        <Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarInformationalIconGlyph}" />
                                        <Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarInformationalSeverityIconForeground}" />
                                    </VisualState.Setters>
                                </VisualState>

                                <VisualState x:Name="Error">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarErrorSeverityBackgroundBrush}" />
                                        <Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarErrorSeverityIconBackground}" />
                                        <Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarErrorIconGlyph}" />
                                        <Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarErrorSeverityIconForeground}" />
                                    </VisualState.Setters>
                                </VisualState>

                                <VisualState x:Name="Warning">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarWarningSeverityBackgroundBrush}" />
                                        <Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarWarningSeverityIconBackground}" />
                                        <Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarWarningIconGlyph}" />
                                        <Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarWarningSeverityIconForeground}" />
                                    </VisualState.Setters>
                                </VisualState>

                                <VisualState x:Name="Success">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRoot.Background" Value="{ThemeResource InfoBarSuccessSeverityBackgroundBrush}" />
                                        <Setter Target="IconBackground.Foreground" Value="{ThemeResource InfoBarSuccessSeverityIconBackground}" />
                                        <Setter Target="StandardIcon.Text" Value="{StaticResource InfoBarSuccessIconGlyph}" />
                                        <Setter Target="StandardIcon.Foreground" Value="{ThemeResource InfoBarSuccessSeverityIconForeground}" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="IconStates">
                                <VisualState x:Name="StandardIconVisible">
                                    <VisualState.Setters>
                                        <Setter Target="UserIconBox.Visibility" Value="Collapsed" />
                                        <Setter Target="StandardIconArea.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                </VisualState>

                                <VisualState x:Name="UserIconVisible">
                                    <VisualState.Setters>
                                        <Setter Target="UserIconBox.Visibility" Value="Visible" />
                                        <Setter Target="StandardIconArea.Visibility" Value="Collapsed" />
                                    </VisualState.Setters>
                                </VisualState>

                                <VisualState x:Name="NoIconVisible" />
                            </VisualStateGroup>

                            <VisualStateGroup>
                                <VisualState x:Name="CloseButtonVisible" />
                                <VisualState x:Name="CloseButtonCollapsed">
                                    <VisualState.Setters>
                                        <Setter Target="CloseButton.Visibility" Value="Collapsed" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="InfoBarVisibility">
                                <VisualState x:Name="InfoBarVisible" />
                                <VisualState x:Name="InfoBarCollapsed">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRoot.Visibility" Value="Collapsed" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>

                            <VisualStateGroup>
                                <VisualState x:Name="ForegroundNotSet" />
                                <VisualState x:Name="ForegroundSet">
                                    <VisualState.Setters>
                                        <Setter Target="Title.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}" />
                                        <Setter Target="Message.Foreground" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
