Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:ctl="clr-namespace:Velib.Controls"
- xmlns:conv="clr-namespace:Velib.Converters">
- <Style TargetType="{x:Type ctl:DualHeaderGroupBox}">
- <Setter Property="BorderBrush" Value="#D5DFE5" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ctl:DualHeaderGroupBox}">
- <ControlTemplate.Resources>
- <conv:DualBorderGapMaskConverter x:Key="DualBorderGapMaskConverter" />
- </ControlTemplate.Resources>
- <Grid SnapsToDevicePixels="True">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="6"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="6"/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="6"/>
- </Grid.ColumnDefinitions>
- <Border Grid.Row="1" Grid.Column="0"
- Grid.RowSpan="3" Grid.ColumnSpan="5"
- CornerRadius="4"
- Background="{TemplateBinding Background}"
- BorderBrush="Transparent"
- BorderThickness="{TemplateBinding BorderThickness}"/>
- <Border Name="LeftHeader"
- Grid.Row="0" Grid.Column="1"
- Grid.RowSpan="2"
- HorizontalAlignment="Left"
- Padding="3,1,3,0">
- <ContentPresenter ContentSource="LeftHeader"
- RecognizesAccessKey="true"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </Border>
- <Border Name="RightHeader"
- Grid.Row="0" Grid.Column="3"
- Grid.RowSpan="2"
- HorizontalAlignment="Right"
- Padding="3,1,3,0">
- <ContentPresenter ContentSource="RightHeader"
- RecognizesAccessKey="true"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </Border>
- <ContentPresenter Grid.Row="2" Grid.Column="1"
- Grid.ColumnSpan="3"
- Margin="{TemplateBinding Padding}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- <Border Grid.Row="1"
- Grid.RowSpan="3" Grid.ColumnSpan="5"
- CornerRadius="4"
- BorderThickness="{TemplateBinding BorderThickness}"
- BorderBrush="White"
- IsHitTestVisible="False">
- <Border.OpacityMask>
- <MultiBinding Converter="{StaticResource DualBorderGapMaskConverter}" ConverterParameter="7">
- <Binding ElementName="LeftHeader" Path="ActualWidth" />
- <Binding ElementName="RightHeader" Path="ActualWidth" />
- <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
- <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
- </MultiBinding>
- </Border.OpacityMask>
- <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="3">
- <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="White" CornerRadius="2" />
- </Border>
- </Border>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement