わかりましたので、タブ コントロール テンプレートを変更して 2 つのボタンを追加しました。1 つは開くボタン、もう 1 つは他のタブと共に保存するボタンです。
私がする必要があるのは、ウィンドウ内にある OpenSave/CloseSave 関数をボタンで実行することです。各ウィンドウには、開く機能と保存する機能が異なるため、ウィンドウ内から機能を使用する必要があります。
<Style x:Key="EditorTabControl" TargetType="{x:Type TabControl}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid SnapsToDevicePixels="True">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="0" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Border Grid.Row="2" Panel.ZIndex="1" Background="#fafafa" Padding="10" BorderBrush="#ededed" BorderThickness="0 1 0 0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button Content="Open" Style="{StaticResource EditorButtonStyle}"/>
<Button Content="Save" Style="{StaticResource EditorButtonStyle}"/>
<TabPanel IsItemsHost="True"/>
</StackPanel>
</Border>
<Border Grid.Row="0" BorderThickness="0" BorderBrush="#696969" Background="#FFF">
<ContentPresenter Content="{TemplateBinding SelectedContent}" />
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
では、コントロール テンプレートが使用されているウィンドウ内にある関数を実行するにはどうすればよいでしょうか。