私はWPF開発の初心者です。内側にフレームのあるウィンドウをいくつか作成します。フレームのテンプレートを作成しましたが、フレーム テンプレート コマンド内のボタンにバインドしようとしていますが、成功していません。
次のコードを参照してください。
<Grid.Resources>
<ControlTemplate TargetType="Frame" x:Key="NavigationButtonsTemplates">
<DockPanel>
<StackPanel
Margin="7"
Orientation="Horizontal"
DockPanel.Dock="Bottom"
HorizontalAlignment="Right"
>
<Button
Content="Back"
Command="{x:Static NavigationCommands.BrowseBack}"
Margin="5,0,5,0" Width="80" />
<Button
Content="Next"
Command="{Binding Path=NavigateToPersonalDataCommand}"
Margin="5,0,5,0" Width="80"></Button>
</StackPanel>
<Border
BorderBrush="LightBlue"
Margin="7,8,9,0"
BorderThickness="7"
Padding="5"
CornerRadius="7"
Background="White"
>
<ContentPresenter />
</Border>
</DockPanel>
</ControlTemplate>
</Grid.Resources>
ボタンのバインドが機能していないようです。ボタンをタグの外側に配置すると、完全に機能します。にあるボタンにコマンドをバインドするにはどうすればよいですか?
ありがとう