Commanding with C1Toolbar for Silverlight

Silverlight 4 supports the ICommand interface on any object that derives from the ButtonBase class. Any button, including C1ToolbarButton, can be associated with an object that implements ICommand through the control’s Command property. Although the ICommand interface is supported, Silverlight does not provide any built-in implementation. ComponentOne Studio for Silverlight includes a couple implementations, C1Command and C1ToolbarCommand, so you do not have to write one yourself.

The C1Command class is included in the C1.Silverlight assembly. C1ToolbarCommand, included in the C1.Silverlight.Toolbar assembly, extends C1Command by adding a few extra toolbar related properties for labels and images.

The following steps demonstrate how to use commanding with C1Toolbar.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.