I want to achieve to set the Foreground Color of a TabItemEx-Header to red, if something is invalid in my form. I set it with a trigger (TargetType="igWindows:TabItemEx")
<Setter Property="TextElement.Foreground" Value="Red" />
but unfortunately, the background of the whole TabItem is affected, if it is not selected, and looks like the screenshot in the attachment shows it.
Any suggestions would be great :-)
Hello Hico,Adding a custom HeaderTemplate for the TabItemEx header will allow you to modify the default styling for the headers and add a trigger for the foreground color.You can have a look at the following forum thread for a sample project illustrating the setting of custom header template http://es.infragistics.com/community/forums/t/97805.aspx.Let me know if you have any other questions.
Thx for the quick answer, but unfortunately does not help that much, because it set's the color of a selected tab only, and the problem is: I don't wanna set it to ALL tabitems ALWAYS, but just to a few, on which a validation fails. Dynamically, for example with the help of a trigger. This already works with a standard Tab-Control, in this way:
<Trigger Property="core:TabErrorValidation.HasErrors" Value="True"> <Setter Property="Foreground" Value="Red" /> </Trigger>
Hello Hico,
I have reviewed your requirement and I can suggest you see this forum thread: http://es.infragistics.com/community/forums/t/41505.aspx where a similar questions is already discussed. Basically you can set the TabItemIsSelectedTextFillKey brush key instead of using styles, for example:
<igWindows:XamTabControl.Resources> <SolidColorBrush Color="Red" x:Key="{x:Static igWindows:PrimitivesBrushKeys.TabItemIsSelectedTextFillKey}" /></igWindows:XamTabControl.Resources>
Sincerely, ZhivkoEntry Level Software Developer