mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-20 16:36:36 +08:00
46 lines
2.2 KiB
XML
46 lines
2.2 KiB
XML
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
<Design.PreviewWith>
|
|
<StackPanel Orientation="Horizontal">
|
|
<ToggleSwitch
|
|
Theme="{DynamicResource IconBorderlessToggleSwitch}"
|
|
Content="{StaticResource SemiIconStar}" />
|
|
<Button
|
|
Theme="{DynamicResource IconBorderlessButton}"
|
|
Content="{StaticResource SemiIconStar}" />
|
|
</StackPanel>
|
|
</Design.PreviewWith>
|
|
|
|
<ControlTheme x:Key="IconBorderlessToggleSwitch"
|
|
BasedOn="{StaticResource ButtonToggleSwitch}"
|
|
TargetType="ToggleSwitch">
|
|
<Setter Property="Padding" Value="{StaticResource SemiThicknessTight}" />
|
|
<Setter Property="Width" Value="{StaticResource SemiSpacingExtraLoose}" />
|
|
<Setter Property="Height" Value="{StaticResource SemiSpacingExtraLoose}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource SemiColorText1}" />
|
|
<Setter Property="OnContentTemplate">
|
|
<StaticResource ResourceKey="GeometryDataTemplate" />
|
|
</Setter>
|
|
<Setter Property="OffContentTemplate">
|
|
<StaticResource ResourceKey="GeometryDataTemplate" />
|
|
</Setter>
|
|
<Setter Property="ContentTemplate">
|
|
<StaticResource ResourceKey="GeometryDataTemplate" />
|
|
</Setter>
|
|
</ControlTheme>
|
|
|
|
<ControlTheme x:Key="IconBorderlessButton"
|
|
BasedOn="{StaticResource BorderlessButton}"
|
|
TargetType="Button">
|
|
<Setter Property="Padding" Value="{StaticResource SemiThicknessTight}" />
|
|
<Setter Property="Width" Value="{StaticResource SemiSpacingExtraLoose}" />
|
|
<Setter Property="Height" Value="{StaticResource SemiSpacingExtraLoose}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource SemiColorText1}" />
|
|
<Setter Property="ContentTemplate">
|
|
<StaticResource ResourceKey="GeometryDataTemplate" />
|
|
</Setter>
|
|
</ControlTheme>
|
|
|
|
<DataTemplate x:Key="GeometryDataTemplate" DataType="Geometry">
|
|
<PathIcon Theme="{StaticResource InnerPathIcon}" Data="{Binding}" />
|
|
</DataTemplate>
|
|
</ResourceDictionary> |