change background color dynamically

2 posts, 0 answers
  1. chris
    chris avatar
    4 posts
    Member since:
    Jul 2011

    Posted 16 Oct 2011 Link to this post


    how can i set the menu item  background color dynamically


    the menu will work as a notification control. a timer will be set every 5 seconds to call the web service. the result will be added to an observable  collection. while looping through the collection if a condition is met the background color should change.

    whats been accomplished

    the timer is working..
    the observable collection binds to the menu

    to do

    change background color dynamically when enabled = false

    I've referenced the following example




  2. Dani
    Dani avatar
    848 posts

    Posted 20 Oct 2011 Link to this post

    Hi Chris,

    Please, correct me if I am wrong, but from what you explained, I understand that you wish to apply a different background color to the menu item when the menu item is enabled or disbaled.

    If that is the case, then the most simple solution would be for you to use an ItemContainerStyle for the RadMenu and edit its visual states. Simply adjust the disabled state to reflect the background you wish. No additional code needed.

    If this is not part of your scenario, I belive you will most probably need a solution where you apply a boolean-to-brush converter. If so, please share more details on your case.

    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. DevCraft R3 2016 release webinar banner
Back to Top