|
| 1 | +<ResourceDictionary xmlns="https://github.com/avaloniaui" |
| 2 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
| 3 | + <ControlTheme x:Key="{x:Type HeaderedContentControl}" |
| 4 | + TargetType="HeaderedContentControl"> |
| 5 | + <Setter Property="Template"> |
| 6 | + <ControlTemplate> |
| 7 | + <Border Name="PART_RootBorder" |
| 8 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 9 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 10 | + CornerRadius="{TemplateBinding CornerRadius}" |
| 11 | + Background="{TemplateBinding Background}" |
| 12 | + Padding="{TemplateBinding Padding}"> |
| 13 | + <DockPanel Name="PART_RootPanel"> |
| 14 | + <ContentPresenter Name="PART_HeaderPresenter" |
| 15 | + Content="{TemplateBinding Header}" |
| 16 | + RecognizesAccessKey="True" |
| 17 | + ContentTemplate="{TemplateBinding HeaderTemplate}" |
| 18 | + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 19 | + VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
| 20 | + FontSize="{TemplateBinding FontSize}" |
| 21 | + FontWeight="{TemplateBinding FontWeight}" |
| 22 | + FontFamily="{TemplateBinding FontFamily}" |
| 23 | + FontStyle="{TemplateBinding FontStyle}"/> |
| 24 | + <ContentPresenter Name="PART_ContentPresenter" |
| 25 | + ContentTemplate="{TemplateBinding ContentTemplate}" |
| 26 | + Content="{TemplateBinding Content}" |
| 27 | + RecognizesAccessKey="True" |
| 28 | + VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
| 29 | + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 30 | + FontSize="{TemplateBinding FontSize}" |
| 31 | + FontWeight="{TemplateBinding FontWeight}" |
| 32 | + FontFamily="{TemplateBinding FontFamily}" |
| 33 | + FontStyle="{TemplateBinding FontStyle}"/> |
| 34 | + </DockPanel> |
| 35 | + </Border> |
| 36 | + </ControlTemplate> |
| 37 | + </Setter> |
| 38 | + |
| 39 | + <Style Selector="^ /template/ DockPanel#PART_RootPanel"> |
| 40 | + <Style Selector="^ > ContentPresenter#PART_HeaderPresenter"> |
| 41 | + <Setter Property="DockPanel.Dock" Value="Top"/> |
| 42 | + </Style> |
| 43 | + </Style> |
| 44 | + </ControlTheme> |
| 45 | +</ResourceDictionary> |
0 commit comments