Default Style for StyleSelector

2 posts, 0 answers
  1. azbola
    azbola avatar
    13 posts
    Member since:
    Jun 2007

    Posted 24 Feb 2011 Link to this post

    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.
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 28 Feb 2011 Link to this post

    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!
Back to Top