开发者

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜