Browse Source
* Move ContentPresenter template to the property default value * Fix some unit tests * Fix more tests * Fix more tests * Update api rulespull/13531/head
committed by
GitHub
15 changed files with 80 additions and 124 deletions
@ -1,20 +0,0 @@ |
|||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" |
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
||||
x:ClassModifier="internal"> |
|
||||
<ControlTheme x:Key="{x:Type ContentControl}" TargetType="ContentControl"> |
|
||||
<Setter Property="Template"> |
|
||||
<ControlTemplate> |
|
||||
<ContentPresenter Name="PART_ContentPresenter" |
|
||||
Background="{TemplateBinding Background}" |
|
||||
BorderBrush="{TemplateBinding BorderBrush}" |
|
||||
BorderThickness="{TemplateBinding BorderThickness}" |
|
||||
CornerRadius="{TemplateBinding CornerRadius}" |
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" |
|
||||
Content="{TemplateBinding Content}" |
|
||||
Padding="{TemplateBinding Padding}" |
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/> |
|
||||
</ControlTemplate> |
|
||||
</Setter> |
|
||||
</ControlTheme> |
|
||||
</ResourceDictionary> |
|
||||
@ -1,25 +0,0 @@ |
|||||
<Style xmlns="https://github.com/avaloniaui" |
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
||||
Selector=":is(UserControl)" |
|
||||
x:ClassModifier="internal"> |
|
||||
<Style.Resources> |
|
||||
<ControlTheme x:Key="FluentUserControl" TargetType="UserControl"> |
|
||||
<Setter Property="Template"> |
|
||||
<ControlTemplate> |
|
||||
<ContentPresenter Name="PART_ContentPresenter" |
|
||||
Background="{TemplateBinding Background}" |
|
||||
BorderBrush="{TemplateBinding BorderBrush}" |
|
||||
BorderThickness="{TemplateBinding BorderThickness}" |
|
||||
CornerRadius="{TemplateBinding CornerRadius}" |
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" |
|
||||
Content="{TemplateBinding Content}" |
|
||||
Padding="{TemplateBinding Padding}" |
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/> |
|
||||
</ControlTemplate> |
|
||||
</Setter> |
|
||||
</ControlTheme> |
|
||||
</Style.Resources> |
|
||||
|
|
||||
<Setter Property="Theme" Value="{StaticResource FluentUserControl}" /> |
|
||||
</Style> |
|
||||
@ -1,21 +0,0 @@ |
|||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" |
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
||||
x:ClassModifier="internal"> |
|
||||
<ControlTheme x:Key="{x:Type ContentControl}" |
|
||||
TargetType="ContentControl"> |
|
||||
<Setter Property="Template"> |
|
||||
<ControlTemplate> |
|
||||
<ContentPresenter Name="PART_ContentPresenter" |
|
||||
Padding="{TemplateBinding Padding}" |
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
|
||||
Background="{TemplateBinding Background}" |
|
||||
BorderBrush="{TemplateBinding BorderBrush}" |
|
||||
BorderThickness="{TemplateBinding BorderThickness}" |
|
||||
Content="{TemplateBinding Content}" |
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" |
|
||||
CornerRadius="{TemplateBinding CornerRadius}" /> |
|
||||
</ControlTemplate> |
|
||||
</Setter> |
|
||||
</ControlTheme> |
|
||||
</ResourceDictionary> |
|
||||
@ -1,26 +0,0 @@ |
|||||
<Style xmlns="https://github.com/avaloniaui" |
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
||||
Selector=":is(UserControl)" |
|
||||
x:ClassModifier="internal"> |
|
||||
<Style.Resources> |
|
||||
<ControlTheme x:Key="SimpleUserControl" |
|
||||
TargetType="UserControl"> |
|
||||
<Setter Property="Template"> |
|
||||
<ControlTemplate> |
|
||||
<ContentPresenter Name="PART_ContentPresenter" |
|
||||
Padding="{TemplateBinding Padding}" |
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
|
||||
Background="{TemplateBinding Background}" |
|
||||
BorderBrush="{TemplateBinding BorderBrush}" |
|
||||
BorderThickness="{TemplateBinding BorderThickness}" |
|
||||
Content="{TemplateBinding Content}" |
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" |
|
||||
CornerRadius="{TemplateBinding CornerRadius}" /> |
|
||||
</ControlTemplate> |
|
||||
</Setter> |
|
||||
</ControlTheme> |
|
||||
</Style.Resources> |
|
||||
|
|
||||
<Setter Property="Theme" Value="{StaticResource SimpleUserControl}" /> |
|
||||
</Style> |
|
||||
Loading…
Reference in new issue