feat: DualBadge CornerRadius.
This commit is contained in:
@@ -19,40 +19,38 @@
|
||||
<ControlTemplate TargetType="{x:Type u:DualBadge}">
|
||||
<Border
|
||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}">
|
||||
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
||||
ClipToBounds="True"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid ColumnDefinitions="*,*">
|
||||
<Border
|
||||
<DockPanel
|
||||
Grid.Column="0"
|
||||
Background="{TemplateBinding HeaderBackground}"
|
||||
CornerRadius="{DynamicResource DualBadgeDefaultLeftCornerRadius}">
|
||||
<DockPanel>
|
||||
<ContentPresenter
|
||||
Name="{x:Static u:DualBadge.PART_Icon}"
|
||||
Width="14"
|
||||
Height="14"
|
||||
Margin="2 0 0 0"
|
||||
IsVisible="{TemplateBinding Icon,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
Foreground="{TemplateBinding IconForeground}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Content="{TemplateBinding Icon}"
|
||||
ContentTemplate="{TemplateBinding IconTemplate}" />
|
||||
<ContentPresenter
|
||||
Name="{x:Static u:DualBadge.PART_HeaderPresenter}"
|
||||
TextElement.FontSize="{TemplateBinding FontSize}"
|
||||
IsVisible="{TemplateBinding Header,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
Foreground="{TemplateBinding HeaderForeground}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
Background="{TemplateBinding HeaderBackground}">
|
||||
<ContentPresenter
|
||||
Name="{x:Static u:DualBadge.PART_Icon}"
|
||||
Width="14"
|
||||
Height="14"
|
||||
Margin="2 0 0 0"
|
||||
IsVisible="{TemplateBinding Icon,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
Foreground="{TemplateBinding IconForeground}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Content="{TemplateBinding Icon}"
|
||||
ContentTemplate="{TemplateBinding IconTemplate}" />
|
||||
<ContentPresenter
|
||||
Name="{x:Static u:DualBadge.PART_HeaderPresenter}"
|
||||
TextElement.FontSize="{TemplateBinding FontSize}"
|
||||
IsVisible="{TemplateBinding Header,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
Foreground="{TemplateBinding HeaderForeground}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}"/>
|
||||
</DockPanel>
|
||||
<ContentPresenter
|
||||
Name="{x:Static u:DualBadge.PART_ContentPresenter}"
|
||||
Grid.Column="1"
|
||||
TextElement.FontSize="{TemplateBinding FontSize}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Background="{TemplateBinding Background}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
@@ -60,5 +58,9 @@
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:header-empty">
|
||||
<Setter Property="HeaderBackground" Value="LightGreen" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user