月更
This commit is contained in:
30
AntDesignWPF/Styles/AntIcon.xaml
Normal file
30
AntDesignWPF/Styles/AntIcon.xaml
Normal file
@@ -0,0 +1,30 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:controls="clr-namespace:AntDesign.WPF.Controls"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Style TargetType="{x:Type controls:AntIcon}">
|
||||
<Setter Property="FlowDirection" Value="LeftToRight" />
|
||||
<Setter Property="Height" Value="16" />
|
||||
<Setter Property="Foreground" Value="{StaticResource IconBrush}" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:AntIcon}">
|
||||
<Border
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<Viewbox FlowDirection="{TemplateBinding FlowDirection}">
|
||||
<Canvas Height="24" Width="24">
|
||||
<Path Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}}" Fill="{TemplateBinding Foreground}" />
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="Width" Value="16" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user