混合显示Pivot
的模板和下面找到的ContentPresenter
,但我在哪里可以找到默认的RightHeaderTemplate
?我希望将RelativePanel
拉伸到整个右侧标题区域。
<ContentPresenter x:Name="RightHeaderPresenter" ContentTemplate="{TemplateBinding RightHeaderTemplate}" Grid.Column="2" Content="{TemplateBinding RightHeader}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
例如,TabView.TabStripFooter
可以默认提供此功能。
尝试此大小,但无济于事:
<Pivot x:Name="MyPivotTable" ItemsSource="{x:Bind ViewModel.MyItems}" SelectedItem="{x:Bind ViewModel.ActiveDocument, Mode=OneWay}">
<Pivot.RightHeader>
<RelativePanel Width="{Binding ElementName=MyPivotTable, Path=RightHeader.ActualWidth}">
控件正向最右对齐:
1条答案
按热度按时间f1tvaqid1#
You can find the default styles, templates in the generic.xaml. AFAIK, you should be able to find the generic.xaml here:
C:\Users???.nuget\packages\microsoft.windowsappsdk\1.1.5\lib\net5.0-windows10.0.17763.0\Microsoft.WinUI\Themes\generic.xaml
UPDATE
You can stretch the RightHeader area by changing the
ColumnDefinitions
. Since the RightHeaderPresenter is assigned toGrid.Column="2"
, this should work: