<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ghfvs="https://github.com/github/VisualStudio"
                    xmlns:local="clr-namespace:GitHub.VisualStudio.UI.Controls"
                    xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf">
    <Style TargetType="local:InfoPanel">
        <Setter Property="Background" Value="{DynamicResource VsBrush.InfoBackground}"/>
        <Setter Property="Foreground" Value="{DynamicResource VsBrush.InfoText}"/>
        <Setter Property="Padding" Value="8"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:InfoPanel">
                    <Border Background="{TemplateBinding Background}"
                            Padding="{TemplateBinding Padding}"
                            Visibility="{TemplateBinding Message, Converter={ghfvs:NullOrWhitespaceToVisibilityConverter}}">
                        <DockPanel>
                            <DockPanel.Resources>
                                <ResourceDictionary>
                                    <ResourceDictionary.MergedDictionaries>
                                        <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml"/>
                                        <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/Markdown.xaml" />
                                    </ResourceDictionary.MergedDictionaries>
                                    <Style x:Key="DocumentStyle" TargetType="FlowDocument">
                                        <Setter Property="FontFamily" Value="Segoe UI"/>
                                        <Setter Property="FontSize" Value="12"/>
                                        <Setter Property="TextAlignment" Value="Left"/>
                                        <Setter Property="PagePadding" Value="0"/>
                                    </Style>
                                    <Style x:Key="LinkStyle" TargetType="Hyperlink">
                                        <Setter Property="Foreground" Value="{DynamicResource GitHubActionLinkItemBrush}"/>
                                        <Setter Property="TextDecorations" Value="Underline"/>
                                    </Style>
                                </ResourceDictionary>
                            </DockPanel.Resources>

                            <ghfvs:OcticonImage Width="16"
                                            Height="16"
                                            Margin="0,0,8,0"
                                            VerticalAlignment="Top"
                                            DockPanel.Dock="Left"
                                            Icon="{TemplateBinding Icon}"/>
                            <ghfvs:OcticonButton x:Name="PART_CloseButton"
                                             Width="16"
                                             Height="16"
                                             Margin="0"
                                             VerticalAlignment="Top"
                                             Background="Transparent"
                                             DockPanel.Dock="Right"
                                             Icon="x"
                                             Visibility="{TemplateBinding ShowCloseButton, Converter={ghfvs:BooleanToVisibilityConverter}}"/>
                            <markdig:MarkdownViewer Margin="8,0"
                                                VerticalAlignment="Top"
                                                DockPanel.Dock="Top"
                                                Markdown="{TemplateBinding Message}"
                                                ScrollViewer.CanContentScroll="False"
                                                ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                                                ScrollViewer.VerticalScrollBarVisibility="Hidden">
                                <markdig:MarkdownViewer.Resources>
                                    <!-- Don't highlight selected text-->
                                    <Style TargetType="{x:Type FlowDocumentScrollViewer}">
                                        <Setter Property="SelectionOpacity" Value="0" />
                                    </Style>
                                </markdig:MarkdownViewer.Resources>
                            </markdig:MarkdownViewer>
                        </DockPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>