| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:ZUI="clr-namespace:CustomUI">
- <Style TargetType="{x:Type ZUI:ZGroupBox}">
- <Setter Property="Foreground" Value="Black" />
- <Setter Property="BorderBrush" Value="#D7DDE4" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="HeaderBackground" Value="#F5F7F9" />
- <Setter Property="HeaderPadding" Value="5" />
- <Setter Property="CornerRadius" Value="0" />
- <Setter Property="HorizontalHeaderAlignment" Value="Stretch" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="UseLayoutRounding" Value="True" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ZUI:ZGroupBox}">
- <Border
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="{TemplateBinding CornerRadius}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
- UseLayoutRounding="{TemplateBinding UseLayoutRounding}">
- <Grid SnapsToDevicePixels="True">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Border
- x:Name="Header"
- Grid.Row="0"
- Padding="{TemplateBinding HeaderPadding}"
- Background="{TemplateBinding HeaderBackground}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="0,0,0,1"
- CornerRadius="{Binding CornerRadiusInner, RelativeSource={RelativeSource TemplatedParent}}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
- UseLayoutRounding="False">
- <ContentPresenter
- HorizontalAlignment="{TemplateBinding HorizontalHeaderAlignment}"
- Content="{TemplateBinding Header}"
- ContentSource="Header"
- ContentStringFormat="{TemplateBinding HeaderStringFormat}"
- ContentTemplate="{TemplateBinding HeaderTemplate}"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <ContentPresenter
- Grid.Row="1"
- Margin="{TemplateBinding Padding}"
- Content="{TemplateBinding Content}"
- ContentStringFormat="{TemplateBinding ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Grid>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|