We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Tab Control selected foreground brushes

Hello, I'm using the Syncfusion WinRT Tab Control in a project. I've set the SelectedForeground property on the control to highlight the selected tab header by color, however I'm running into a problem. The text-based controls get highlighted correctly, but if I use a custom graphic via a Path control, the foreground color does not get set correctly. The Path graphic remains white, while the surrounding text is the correct selected red color. What brush should I set the fill of the Path control to, in order to have it match the surrounding text color when selected?

3 Replies

VV Vignesh V Syncfusion Team January 9, 2014 08:51 AM UTC

Hi Dmitri,

We have prepared a sample that could meet your requirement 'Changing Path Color while selecting an item'. In the sample we have binded the Fill property of Path to the Foreground of the Template's parent.

Please find the sample in below link,

Please let us know if you have any queries.

Regards,
Vignesh V




DA Dmitri Artamanov January 9, 2014 03:28 PM UTC

Vignesh, it doesn't quite help because my tab items are defined explicitly, the tab control is not bound to a set of items as its source. As a result, I can't use the TemplatedParent RelativeSource. My tab control structure looks like this:

<navigation:SfTabControl>
<navigation:SfTabItem>
                        <navigation:SfTabItem.Header>
                                // Header
                        </navigation:SfTabItem.Header>
                                // Content
</navigation:SfTabItem>
<navigation:SfTabItem>
                        <navigation:SfTabItem.Header>
                                // Header
                        </navigation:SfTabItem.Header>
                                // Content
</navigation:SfTabItem>
</navigation:SfTabControl>


VJ Victory Jessie Selvam D Syncfusion Team January 13, 2014 09:16 AM UTC

Hi Dmitri,

 

We have modified the sample based on your requirement. We are unable to reproduce the reported problem with this sample. Kindly revert us with modified sample replicating the issue so that we can proceed further in solving the problem.

 

Please let us know whether the provided sample resolves your problem.

 

Regards,

Victory



Tabcontrol_115275_5edb25b7.zip

Loader.
Live Chat Icon For mobile
Up arrow icon