我有一个绑定到属性的选项卡。我希望选项卡在特定条件下更改颜色,但如果不满足这些条件,我希望选项卡转到选项卡的系统默认值。我知道如何更改颜色但不让它进入系统默认值。有什么建议么?
WPF:
<TabItem Header="Initial" Name="tab_1Initial" Background="{Binding Path=initialTab.tabColor}">
VB.NET:
tabColor = New BrushConverter().ConvertFrom("#FF89DE93")
VB.NET:
Public Property tabColor As Brush
Get
Return _tabColor
End Get
Set(value As Brush)
_tabColor = value
NotifyPropertyChanged("tabColor")
End Set
End Property