This is a migrated thread and some comments may be shown as answers.

Default Style for StyleSelector

1 Answer 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
azbola
Top achievements
Rank 1
azbola asked on 24 Feb 2011, 11:16 AM
Hi all,

Is there a way to have a StyleSelector return Null and pick up a default style from the Xaml definition?
I tried this using both the CellStyle and CellStyleSelector but the style selector does not seem to get applied in this case.

What I am trying to do is I have a style selector that turns the background red when the value in the cell exceeds a threshold, but if it does not then show the style that is defined in the Xaml for that cell.

The only way I can seem to think of doing this is to look at the name of the column in the style selector and set the default style there, but this is bad as I just want to declare the default once per cell in the Xaml definition.

Is this possible?

Many thanks,
Dave A.

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 28 Feb 2011, 05:07 PM
Hello azbola,

I am not sure I get the question right . Can you please give me an example of what do you mean by "declare the default once per cell in the Xaml definition".

Having this I will try to gather an example for you.

Kind regards,
Pavel Pavlov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
General Discussions
Asked by
azbola
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or