<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>