ComboBox などのコントロールを (再) テンプレート化したいと考えています。
XAML:
<ComboBox Style="{StaticResource MyComboBoxStyle}" ... >
<!-- ... -->
</ComboBox>
ControlTemplate に Button が必要です。
リソース辞書:
<Style x:Key="MyComboBoxStyle" TargetType="{x:Type ComboBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
<Grid>
<!-- ... -->
<Button Command="{TemplateBinding Tag}" CommandParameter="{Binding ???}" />
<!-- ... -->
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
CommandParameter
しかし、テンプレートを適用したコントロール (この例では ComboBox)に設定したいと思います。
どうすればこれを解決できますか?