RadSplitButton IsChecked

6 posts, 1 answers
  1. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 25 Jun 2010 Link to this post

    We've noticed the IsChecked property does not respond to changes in the ViewModel. The properties the buttons IsChecked properties are bound to raise PropertyChanged events in the ViewModel, but do not respond to the event. Any ideas why they would not respond to changes?

    We're using the most current 2010 release in a .Net 3.5 WPF application using the MVVM pattern.
  2. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 30 Jun 2010 Link to this post

    Hello kilhoffer,

    In order to get IsChecked working, you should first set the "IsToggle = True".
    Hope this will helps you.

    Sincerely yours,
    Miro Miroslavov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 06 Jul 2010 Link to this post

    I'm afraid the problem is more complicated than that. If I set IsToggle to true, I can change it's IsChecked property programatically from the ViewModel and everything seems to work, but once I toggle it by clicking the SplitButton itself, programatically switching the IsChecked property from the ViewModel no longer has any effect. We need this button's state to be manipulated programatically, not just by clicking the button itself. Any ideas why it works from the ViewModel up until the point it's manually clicked but not thereafter?
  5. Answer
    Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 08 Jul 2010 Link to this post

    Hi kilhoffer,

    Can you make sure the you bind the IsChecked property TwoWay?
    If it is not set, default is OneWay, which is causing the problem.

    Greetings,
    Miro Miroslavov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 08 Jul 2010 Link to this post

    You're right, that was the cause. I had not explicitly set the mode to TwoWay because WPF's default binding mode is already TwoWay. Did Telerik override this in the SplitButton control to make the default OneWay?

    Here's the MSDN article that states TwoWay binding mode is the default on the intrinsic controls.

    Thanks for the help. It's all working as expected now.
  7. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 13 Jul 2010 Link to this post

    Hi kilhoffer,

    My fault - I thought it's about Silverlight. Yes in WPF for the intrinsic controls the default value is TwoWay. But IsChecked is custom defined property and it is defined with default value of OneWay (for compatibility reasons with Silverlight).


    Greetings,
    Miro Miroslavov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready