HandyControl icon indicating copy to clipboard operation
HandyControl copied to clipboard

给hc:TabItem加触发器设置字体颜色后,hc:TabControl无法切换

Open wslsj888 opened this issue 2 years ago • 0 comments

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}"> <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/> </Trigger> </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}"> <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/> </Trigger> </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

wslsj888 avatar May 21 '23 09:05 wslsj888