ControlPanelItem(Visual, String, Control, ControlProperty, String) Constructor |
Constructs a new control panel item.
Namespace: Demo3D.ControlPanelAssembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.00.00
Syntaxpublic ControlPanelItem(
Visual controlVisual,
string name,
Control control,
ControlProperty property,
string panelName = null
)
Parameters
- controlVisual Visual
- The visual that's bound to the control.
- name String
- The name of the control.
- control Control
- Widget for displaying the control.
- property ControlProperty
- Property value accessor.
- panelName String (Optional)
- Control panel name (or null).
Example
[Auto] void ControlPanelItems(Visual sender, ControlPanelItemsResults items)
{
items.Add(new ControlPanelItem(sender, "ControlName", Control.Lamp, ControlProperty.Create(sender, "IsMotorOn")));
items.Add(new ControlPanelItem(sender, "ControlName", Control.PushableLamp, new ControlProperty[] {
ControlProperty.Create(sender, "IsMotorOn"),
ControlProperty.Create(sender, "IsLiftMotorOn")
}));
items.Add(new ControlPanelItem(sender, "ControlName", "Lamp(LampColor=Red)", ControlProperty.Create(sender, "IsMotorOn")));
items.Add(new ControlPanelItem(sender, "ControlName", "PushableLamp(ManualRelease=true, LampColor=Red)", new ControlProperty[] {
ControlProperty.Create(sender, "IsMotorOn"),
ControlProperty.Create(sender, "IsLiftMotorOn")
}));
items.Add(new ControlPanelItem(sender, "ControlName", Control.Lamp, "IsMotorOn"));
}
See Also