そのため、画像とテキストブロックを含むボタンのテンプレートがあります。持っている画像が大きすぎるので、縮小したいと思います。
<Style x:Key="ImageButton" TargetType="Button">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Vertical">
<Image Source="{Binding Path=(local:ButtonProperties.Image), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}" />
<ContentPresenter Content="{Binding Path=Content, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}}"></ContentPresenter>
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
私が持っているコードの特定のブロックです。Height="X"
ただし、テンプレートに追加しようとすると、エラーが発生します。テンプレート自体で画像サイズを指定する方法はありますか?