2026-06-05 13:44:39 +09:00

56 lines
3.3 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:iconPacks="using:MahApps.Metro.IconPacks"
xmlns:converter="using:MahApps.Metro.IconPacks.Converter">
<ControlTemplate x:Key="MahApps.Templates.PackIconBootstrapIcons" TargetType="iconPacks:PackIconBootstrapIcons">
<Grid>
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" />
<Grid x:Name="PART_InnerGrid"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
RenderTransformOrigin="0.5 0.5"
Margin="{TemplateBinding BorderThickness}">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform x:Name="FlipTransform"
ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleXValueConverter}}"
ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleYValueConverter}}" />
<RotateTransform x:Name="RotationTransform"
Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle, Mode=OneWay}" />
<RotateTransform x:Name="SpinTransform" />
</TransformGroup>
</Grid.RenderTransform>
<Viewbox Margin="{TemplateBinding Padding}">
<Path Fill="{TemplateBinding Foreground}"
Stretch="Uniform"
Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={converter:NullToUnsetValueConverter}}"
RenderTransformOrigin="0.5 0.5"
UseLayoutRounding="False">
<Path.RenderTransform>
<ScaleTransform ScaleY="-1" />
</Path.RenderTransform>
</Path>
</Viewbox>
</Grid>
</Grid>
</ControlTemplate>
<Style x:Key="MahApps.Styles.PackIconBootstrapIcons" TargetType="iconPacks:PackIconBootstrapIcons">
<Setter Property="Height" Value="16" />
<Setter Property="Width" Value="16" />
<Setter Property="Padding" Value="0" />
<Setter Property="FlowDirection" Value="LeftToRight" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="UseLayoutRounding" Value="False" />
<Setter Property="Template" Value="{StaticResource MahApps.Templates.PackIconBootstrapIcons}" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
</Style>
</ResourceDictionary>