Silverlight Togglebutton Set IsPressed state
Hello I have a Toggle button in Silverlight.
I want to set its state to "pressed".First I tried :
btButton.IsPressed = true
But that does not work (readonly).
Then I tried :btButton.SetValue(ToggleB开发者_如何转开发utton.IsPressedProperty, true);
Which also does not work. How do I accomplish this ? I'd assume it would not be that hard...
Use IsChecked. IsPressed tells you whether the mouse or space bar is currently pressing the button. IsChecked tells you how the button is toggled.
btButton.IsChecked = true;
精彩评论