feat: specify CornerRadius.

This commit is contained in:
Zhang Dian 2023-05-10 23:59:47 +08:00
parent cefa6bb4df
commit f29e60712b
3 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,7 @@
<Setter Property="Background" Value="{DynamicResource HeaderedContentControlDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource HeaderedContentControlDefaultBackground}" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="{DynamicResource HeaderedContentControlDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource HeaderedContentControlDefaultBorderBrush}" />
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource HeaderedContentControlCornerRadius}" />
<Setter Property="Width" Value="400" /> <Setter Property="Width" Value="400" />
<Setter Property="Height" Value="200" /> <Setter Property="Height" Value="200" />
<Setter Property="HorizontalAlignment" Value="Stretch" /> <Setter Property="HorizontalAlignment" Value="Stretch" />
@ -21,6 +21,7 @@
Height="{TemplateBinding Height}" Height="{TemplateBinding Height}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
CornerRadius="{TemplateBinding CornerRadius}"
BorderThickness="{TemplateBinding BorderThickness}"> BorderThickness="{TemplateBinding BorderThickness}">
<Grid RowDefinitions="Auto,Auto,*"> <Grid RowDefinitions="Auto,Auto,*">
<ContentPresenter <ContentPresenter

View File

@ -2,4 +2,5 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="HeaderedContentControlDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="HeaderedContentControlDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="HeaderedContentControlDefaultBorderBrush" Opacity="0.08" Color="#F9F9F9" /> <SolidColorBrush x:Key="HeaderedContentControlDefaultBorderBrush" Opacity="0.08" Color="#F9F9F9" />
<CornerRadius x:Key="HeaderedContentControlCornerRadius">4</CornerRadius>
</ResourceDictionary> </ResourceDictionary>

View File

@ -2,4 +2,5 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="HeaderedContentControlDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="HeaderedContentControlDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="HeaderedContentControlDefaultBorderBrush" Opacity="0.08" Color="#1C1F23" /> <SolidColorBrush x:Key="HeaderedContentControlDefaultBorderBrush" Opacity="0.08" Color="#1C1F23" />
<CornerRadius x:Key="HeaderedContentControlCornerRadius">4</CornerRadius>
</ResourceDictionary> </ResourceDictionary>