HandyControl
HandyControl copied to clipboard
使用Prism进行区域模块管理Tab页选中事件有问题
Describe the bug
使用Prism进行区域模块管理是,Tab页选中事件有问题。需要点击两次才有效果,第一次会选中第一个tabitem,第二次点击才选择当前tabitem。
以下是代码‘’
<hc:TabControl Grid.Row="2" Height="300" MaxWidth="800" Margin="0,32,0,0" prism:RegionManager.RegionName="MainRegion" IsAnimationEnabled="True" IsDraggable="True" ShowCloseButton="True"> <TabControl.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding DataContext.Title}" /> </DataTemplate> </TabControl.ItemTemplate> <TabControl.ContentTemplate> <DataTemplate> <hc:SimplePanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Gray" /> </DataTemplate> </TabControl.ContentTemplate> </hc:TabControl>
Steps to reproduce the bug
将prism:RegionManager.RegionName="MainRegion"配置到Tab了Control,后台触发 _regionManager.RequestNavigate("MainRegion", obj);前端UI生成Table页。
Expected behavior
No response
Screenshots
No response
NuGet package version
HandyControl 3.4.0
IDE
Visual Studio 2022
Framework type
.Net Framework 4.7.2
Windows version
No response
Additional context
No response