ControlPanelItem Constructor (Visual, String, Control, String, Boolean, Boolean, String) |
Namespace: Demo3D.ControlPanel
public ControlPanelItem( Visual controlVisual, string name, Control control, string propertyName = null, bool canRead = true, bool canWrite = true, string panelName = null )
// Create a new control panel item, and add to the grid on reset. [Auto] void ControlPanelItems(Visual sender, ControlPanelItemsResults items) { // A lamp indicating if IsMotorOn is true. items.Add(new ControlPanelItem(sender, "ControlName", Control.Lamp, ControlProperty.Create(sender, "IsMotorOn"))); // A pushable lamp with IsPushed and IsOn bound to two seperate properties. items.Add(new ControlPanelItem(sender, "ControlName", Control.PushableLamp, new ControlProperty[] { ControlProperty.Create(sender, "IsMotorOn"), ControlProperty.Create(sender, "IsLiftMotorOn") })); // A red lamp indicating if IsMotorOn is true. items.Add(new ControlPanelItem(sender, "ControlName", "Lamp(LampColor=Red)", ControlProperty.Create(sender, "IsMotorOn"))); // A red pushable lamp with IsPushed and IsOn bound to two seperate properties. items.Add(new ControlPanelItem(sender, "ControlName", "PushableLamp(ManualRelease=true, LampColor=Red)", new ControlProperty[] { ControlProperty.Create(sender, "IsMotorOn"), ControlProperty.Create(sender, "IsLiftMotorOn") })); //A red lamp indicating if IsMotorOn is true. items.Add(new ControlPanelItem(sender, "ControlName", Control.Lamp, "IsMotorOn")); }