Skip to main content
Home Forums General Silverlight Getting Started ToggleButton using
1 replies. Latest Post by Telos on July 7, 2009.
(0)
vemuri.k...
Member
50 points
34 Posts
07-07-2009 12:20 AM |
I need to use 6 ToggleButtons as a group such that if one checked others should be unchecked (with out brute force method). Also want to add styles so that to differentiate the checked one. Any suggestions would help great.
Telos
67 points
43 Posts
07-07-2009 12:51 AM |
I don't think there is any other way than to manually handle the "checked" states of the buttons on their click event handlers. When one is clicked, all others are disabled. For easier handling you can use the same event handler for all the buttons so you don't have to do the same stuff many times. If there is a better way, I would also like to know about it.
The default style also differentiates the checked state but you can edit the template yourself. This is pretty easy with Blend: Edit Control Parts (Template) -> States (Checked)