HandyOrg / HandyOrg/HandyControl
给hc:TabItem加触发器设置字体颜色后,hc:TabControl无法切换
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
如题,代码在下面
Steps to reproduce the bug
<hc:TabControl TabItemWidth="120" Background="Transparent" BorderThickness="0" Margin="10,0,10,0">
<hc:TabItem Header="Tab1" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource appbar.home.garage.arrow.close_ModernUI}">
hc:TabItem.Style
<Style TargetType="{x:Type hc:TabItem}" BasedOn="{StaticResource TabItemPlusBaseStyle}">
<Style.Triggers>
</Style.Triggers>
</Style>
</hc:TabItem.Style>
</hc:TabItem>
<hc:TabItem Header="Tab2" IsSelected="True" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource View Details_Windows10}">
hc:TabItem.Style
<Style TargetType="{x:Type hc:TabItem}" BasedOn="{StaticResource TabItemPlusBaseStyle}">
<Style.Triggers>
</Style.Triggers>
</Style>
</hc:TabItem.Style>
</hc:TabItem>
</hc:TabControl>
Expected behavior
No response
Screenshots
No response
NuGet package version
HandyControl 3.4.0
IDE
Visual Studio 2022-preview
Framework type
No response
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
Start with the provided XAML reproduction using HandyControl 3.4.0, then trace the TabControl and TabItem implementation involved in selection and style triggers. Reproduce the issue with the Foreground trigger enabled; done means the TabControl switches tabs while the selected TabItem still receives the configured color.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100