<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:dhcc="http://www.dhcc.com.cn"
                    xmlns:local="clr-namespace:Platform.Controls.AdornerContainer">
    <Style TargetType="{x:Type local:PromptChrome}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:PromptChrome}">
                    <Grid x:Name="container">
                        <!--  最外圈的白色圆框，并对其作阴影效果  -->
                        <Ellipse Fill="White">
                            <Ellipse.Effect>
                                <DropShadowEffect BlurRadius="3"
                                                  Direction="270"
                                                  Opacity="0.8"
                                                  RenderingBias="Quality"
                                                  ShadowDepth="3" />   
                            </Ellipse.Effect>
                        </Ellipse>

                        <!--  内部的上半圆  -->
                        <Ellipse Margin="2">
                            <Ellipse.Fill>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.5">
                                    <GradientStop Offset="0" Color="#FFF4AEB1" />
                                    <GradientStop Offset="0.5" Color="#ff4040"/>
                                    <GradientStop Offset="1.5" Color="#c00020 " />
                                </LinearGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>

                        <!--  内部的下半圆，通过采用Exclude模式合并上下两个圆来完成  -->
                        <Path HorizontalAlignment="Center" VerticalAlignment="Center">
                            <Path.Data>
                                <CombinedGeometry GeometryCombineMode="Exclude">
                                    <CombinedGeometry.Geometry1>
                                        <EllipseGeometry Center="5 5"
                                                         RadiusX="5"
                                                         RadiusY="5" />
                                    </CombinedGeometry.Geometry1>

                                    <CombinedGeometry.Geometry2>
                                        <EllipseGeometry Center="5 0"
                                                         RadiusX="5"
                                                         RadiusY="5" />
                                    </CombinedGeometry.Geometry2>
                                </CombinedGeometry>
                            </Path.Data>                           
                        </Path>

                        <Viewbox Stretch="Uniform">
                            <!--  绑定上文中的PromptCount属性  -->
                            <Label x:Name="label"
                                   HorizontalAlignment="Center"
                                   VerticalAlignment="Center"
                                   Content="{Binding Path=(local:PromptAdorner.PromptCount)}"
                                   FontSize="10"
                                   FontWeight="Bold"
                                   Foreground="White" />
                        </Viewbox>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <!--  使用数据触发器，当PromptCount为0时，隐藏提示  -->
                        <DataTrigger Binding="{Binding Path=(local:PromptAdorner.PromptCount)}" Value="0">
                            <Setter TargetName="container" Property="Visibility" Value="Hidden" />
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>