HandyOrg / HandyOrg/HandyControl
使用Prism进行区域模块管理Tab页选中事件有问题
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the shown TabControl configured with prism:RegionManager.RegionName="MainRegion", then trace the UI flow after _regionManager.RequestNavigate("MainRegion", obj). Start by examining the TabControl and Prism region interaction; done means the requested tab is selected on the first click, with a regression test or documented verification covering that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100