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

RadSplitButton IsChecked

5 Answers 124 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
kilhoffer
Top achievements
Rank 1
kilhoffer asked on 25 Jun 2010, 03:58 PM
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.

5 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 30 Jun 2010, 12:43 PM
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
0
kilhoffer
Top achievements
Rank 1
answered on 06 Jul 2010, 02:37 PM
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?
0
Accepted
Miro Miroslavov
Telerik team
answered on 08 Jul 2010, 01:35 PM
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
0
kilhoffer
Top achievements
Rank 1
answered on 08 Jul 2010, 01:55 PM
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.
0
Miro Miroslavov
Telerik team
answered on 13 Jul 2010, 01:45 PM
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
Tags
Buttons
Asked by
kilhoffer
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
kilhoffer
Top achievements
Rank 1
Share this question
or