HandyControl icon indicating copy to clipboard operation
HandyControl copied to clipboard

prism框架下,在hc:tabcontrol页面中执行导航不显示标题

Open jerry-2000 opened this issue 3 years ago • 3 comments

Describe the bug

prism框架下,在hc:tabcontrol页面中执行导航不显示标题,原生控件tabcontrol则没问题 xaml: <hc:TabControl x:Name="tab1" BorderThickness="0" Margin="5,0" prism:RegionManager.RegionName="MainTab" ShowCloseButton="True" IsAnimationEnabled="True" IsDraggable="False" IsScrollable="True"> hc:Interaction.Triggers <hc:RoutedEventTrigger RoutedEvent="hc:TabItem.Closed"> <hc:EventToCommand Command="{Binding ClosedCmd}" PassEventArgsToCommand="True"/> </hc:RoutedEventTrigger> </hc:Interaction.Triggers> <hc:TabItem Header="首页" ShowCloseButton="False" x:Name="index"> Views:IndexView/ </hc:TabItem> hc:TabControl.ItemTemplate <DataTemplate> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding DataContext.DataContext.ViewName,UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}"/> </StackPanel> </DataTemplate> </hc:TabControl.ItemTemplate> hc:TabControl.ContentTemplate <DataTemplate> <hc:TransitioningContentControl TransitionMode="Left2Right"> <ContentPresenter Content="{Binding}"/> </hc:TransitioningContentControl> </DataTemplate> </hc:TabControl.ContentTemplate> </hc:TabControl> <TabControl x:Name="tab2" Grid.Column="2" BorderThickness="0" Margin="5,0" prism:RegionManager.RegionName="MainTab2"> <TabControl.ItemTemplate> <DataTemplate> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding DataContext.DataContext.ViewName,UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}"/> </StackPanel> </DataTemplate> </TabControl.ItemTemplate> <TabControl.ContentTemplate> <DataTemplate> <hc:TransitioningContentControl TransitionMode="Left2Right"> <ContentPresenter Content="{Binding}"/> </hc:TransitioningContentControl> </DataTemplate> </TabControl.ContentTemplate> </TabControl> viewmodel: var n1 = new NavigationParameters(); n1.Add("ViewName", "222"); _regionmanager.RequestNavigate("MainTab", "PermissionView", n1); _regionmanager.RequestNavigate("MainTab2", "PermissionView", n1); tabcontrol页面中执行导航 不显示标题

Steps to reproduce the bug

prism框架下,在hc:tabcontrol页面中执行导航不显示标题

Expected behavior

No response

Screenshots

tabcontrol页面中执行导航 不显示标题

NuGet package version

HandyControl 3.3.0

IDE

Visual Studio 2022

Framework type

.Net 6.0

Windows version

Windows 11 (22000)

Additional context

No response

jerry-2000 avatar Nov 07 '22 08:11 jerry-2000