更新
This commit is contained in:
28
AntdWpf/Styles/AntIcon.xaml
Normal file
28
AntdWpf/Styles/AntIcon.xaml
Normal file
@@ -0,0 +1,28 @@
|
||||
<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">
|
||||
<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 Width="24" Height="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