60 lines
3.7 KiB
Plaintext
60 lines
3.7 KiB
Plaintext
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:controls="clr-namespace:AntdWpf.Controls">
|
||
|
|
|
||
|
|
<ResourceDictionary.MergedDictionaries>
|
||
|
|
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/Converters.xaml" />
|
||
|
|
</ResourceDictionary.MergedDictionaries>
|
||
|
|
|
||
|
|
<Style x:Key="Antd.ContentControl" TargetType="{x:Type controls:ContentControl}">
|
||
|
|
<Setter Property="Background" Value="Transparent" />
|
||
|
|
<Setter Property="Focusable" Value="False" />
|
||
|
|
<Setter Property="IsTabStop" Value="False" />
|
||
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||
|
|
<Setter Property="Template">
|
||
|
|
<Setter.Value>
|
||
|
|
<ControlTemplate TargetType="{x:Type controls:ContentControl}">
|
||
|
|
<Grid Background="{TemplateBinding Background}">
|
||
|
|
<ContentPresenter x:Name="PART_ContentPresenter"
|
||
|
|
Margin="{TemplateBinding Padding}"
|
||
|
|
Content="{TemplateBinding Content}"
|
||
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||
|
|
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||
|
|
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
|
||
|
|
RecognizesAccessKey="{TemplateBinding RecognizesAccessKey}"
|
||
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||
|
|
UseLayoutRounding="{TemplateBinding UseLayoutRounding}" />
|
||
|
|
</Grid>
|
||
|
|
<ControlTemplate.Triggers>
|
||
|
|
<Trigger Property="ContentCharacterCasing" Value="Normal">
|
||
|
|
<Setter TargetName="PART_ContentPresenter"
|
||
|
|
Property="Content"
|
||
|
|
Value="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
|
||
|
|
</Trigger>
|
||
|
|
<Trigger Property="ContentCharacterCasing" Value="Upper">
|
||
|
|
<Setter TargetName="PART_ContentPresenter"
|
||
|
|
Property="Content"
|
||
|
|
Value="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ToUpperConverter}}" />
|
||
|
|
</Trigger>
|
||
|
|
<Trigger Property="ContentCharacterCasing" Value="Lower">
|
||
|
|
<Setter TargetName="PART_ContentPresenter"
|
||
|
|
Property="Content"
|
||
|
|
Value="{Binding Content, RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ToLowerConverter}}" />
|
||
|
|
</Trigger>
|
||
|
|
</ControlTemplate.Triggers>
|
||
|
|
</ControlTemplate>
|
||
|
|
</Setter.Value>
|
||
|
|
</Setter>
|
||
|
|
</Style>
|
||
|
|
|
||
|
|
<Style x:Key="Antd.ThumbContentControl"
|
||
|
|
BasedOn="{StaticResource Antd.ContentControl}"
|
||
|
|
TargetType="{x:Type controls:ThumbContentControl}" />
|
||
|
|
|
||
|
|
</ResourceDictionary>
|
||
|
|
|