Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » Command Execution on ToggleButton Collapse All
Subject Author Date
Helmut Wahrmann Jun 4, 2010 - 9:04 AM

A ToggleButton has the Command Property, because it inherits from Button.

But the assigned Command is not executed.

I know that i can listen on the PressedChanged event, but being a Button it should also fire a Command

Technical Support Jun 7, 2010 - 6:52 AM

Actually the Command property is inherited from the Elegant.Ui.Control class which is the base class for most of Elegant Ui controls. Though, each control has a Command property, it does not necessarily means it supports commands. As for ToggleButton, it supports command in a different way than the Button: it doesn’t raise the Command.Execute event, instead it raises the Command.DataChanged event. This is because ToggleButton doesn’t start an action, it holds and changes its boolean state.