RadMenuItem.IsEnabled property is notified only once if bound to Property Value

6 posts, 0 answers
  1. Harshal
    Harshal avatar
    3 posts
    Member since:
    Feb 2013

    Posted 21 Feb 2013 Link to this post

    Hi, 
     I have RAD MenuItem as below -

     

     

     

    <telerik:RadMenuItem x:Name="testMenu" Header="Head" IsEnabled="{Binding IsIconEnabled}" ItemContainerStyle="{StaticResource CommonRadMenuItemStyle}" VerticalAlignment="Center" SubmenuOpened="FileMenu_SubmenuOpened">


    The Property IsIconEnabled when set in the code reflects in UI only once, later whatever times its set in code, its not reflecting in the UI. The property is complaint for INotifyPropertyChanged.
  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 22 Feb 2013 Link to this post

    Hello Harshal,

    We have implemented a scenario based on your code. When you click the button, IsEnabled property of two of the Items in RadMenu will change. Please check the attachment and inform us if you still have any problems or concerns.

    Greetings,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Harshal
    Harshal avatar
    3 posts
    Member since:
    Feb 2013

    Posted 22 Feb 2013 Link to this post

    Why are you using the Mode as TwoWay for Binding? we are not updating anything from UI for this Property. Please remove the TwoWay binding and check.
  5. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 22 Feb 2013 Link to this post

    Hello Harshal,

    Currently this is the only way to set a binding for IsEnabled property. We have designed it this way as some limitations of Silverlight framework.

    We are sorry for the caused inconvenience. Do not hesitate to contact us if still have problems or concerns.

    All the best,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Harshal
    Harshal avatar
    3 posts
    Member since:
    Feb 2013

    Posted 24 Feb 2013 Link to this post

    Hi,
        Actually with the TwoWay binding as well. its internaly changing the IsEnabled Property to True, I am not able detect from where is it making the proiperty as true but I am not able to make out who is setting it to true.
  7. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 25 Feb 2013 Link to this post

    Hello Harshal,

    I'm not sure I fully understand what is the problem. As I've already said, if you want to set Binding for IsEnabled property, you will have to use two-way mode. Could you clarify if you still have any problems setting IsEnabled for your RadMenuItems and what is your current problem? This way we'll be able to provide you better help. From your last mail it seems that when you set two-way binding and IsEnabled property is set to true for all items, no matter what you've already set in your viewmodel, but you can easily see from the project I've already sent you, that this is working correctly (some items are disabled at initialization, after you click the button, they are enabled).

    I'm looking forward to hearing from you.

    Greetings,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner