月更
This commit is contained in:
61
AntDesignWPF/Controls/AntContentControl.xaml
Normal file
61
AntDesignWPF/Controls/AntContentControl.xaml
Normal file
@@ -0,0 +1,61 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:controls="clr-namespace:AntDesignWPF.Controls"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/AntDesignWPF;component/Themes/Converters.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="{x:Type controls:AntContentControl}" x:Key="Ant.ContentControl">
|
||||
<!--<Setter Property="Foreground" Value="{DynamicResource AntDesign.Brush.TextOnPrimary}" />-->
|
||||
<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:AntContentControl}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
RecognizesAccessKey="{TemplateBinding RecognizesAccessKey}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
UseLayoutRounding="{TemplateBinding UseLayoutRounding}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
x:Name="PART_ContentPresenter" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="ContentCharacterCasing" Value="Normal">
|
||||
<Setter Property="Content" TargetName="PART_ContentPresenter" Value="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
</Trigger>
|
||||
<Trigger Property="ContentCharacterCasing" Value="Upper">
|
||||
<Setter Property="Content" TargetName="PART_ContentPresenter" Value="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ToUpperConverter}}" />
|
||||
</Trigger>
|
||||
<Trigger Property="ContentCharacterCasing" Value="Lower">
|
||||
<Setter Property="Content" TargetName="PART_ContentPresenter" Value="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource ToLowerConverter}}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style
|
||||
BasedOn="{StaticResource Ant.ContentControl}"
|
||||
TargetType="{x:Type controls:ThumbContentControl}"
|
||||
x:Key="Ant.ThumbContentControl" />
|
||||
|
||||
<Style BasedOn="{StaticResource Ant.ThumbContentControl}" TargetType="{x:Type controls:ThumbContentControl}" />
|
||||
|
||||
<!--<Style BasedOn="{StaticResource Antd.ContentControl}" TargetType="{x:Type controls:AntContentControl}" />-->
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user