Class StyleSelectionProperty
- Namespace
- CADability.Attribute
- Assembly
- CADability.dll
Property entry that lets the user choose a Style from a StyleList in a drop-down list. It is part of the attribute properties of every IGeoObject in the control center and of the properties of a multiple selection. The name of the style is shown as selected only while the attributes of the object still agree with the style (Check(IGeoObject)); when one of them was changed individually, the name is shown as not selected.
public class StyleSelectionProperty : MultipleChoiceProperty, IPropertyEntry, IShowProperty
- Inheritance
-
StyleSelectionProperty
- Implements
- Inherited Members
Constructors
StyleSelectionProperty(IStyle, string, StyleList)
Creates the entry for the given object.
public StyleSelectionProperty(IStyle objectWithStyle, string resourceId, StyleList styleList)
Parameters
objectWithStyleIStylethe object whose Style is set when the user selects a style; may be null, then the selection is only reported through the StyleChangedEvent
resourceIdstringthe resource id of the label and the tooltip of the entry
styleListStyleListthe list whose styles are offered
Properties
Connected
The IGeoObject this entry controls: its style is set on selection and its changes are watched to update the display. Setting it switches the entry to another object; the construct actions do this when the object under construction is replaced.
public IGeoObject Connected { get; set; }
Property Value
Methods
Added(IPropertyPage)
Implementation of Added(IPropertyPage): memorizes the page in propertyPage and reports Added. Override it to subscribe to events while the entry is displayed, and call the base implementation.
public override void Added(IPropertyPage propertyPage)
Parameters
propertyPageIPropertyPage
OnSelectionChanged(string)
Called when the user has picked a choice. Raises SelectionChangedEvent, stores the text in SelectedText and raises ValueChangedEvent. Derived classes override it to pass the selection on to the object they represent.
protected override void OnSelectionChanged(string selected)
Parameters
selectedstringThe selected text
Removed(IPropertyPage)
Overrides Removed(IPropertyPage)
public override void Removed(IPropertyPage propertyPage)
Parameters
propertyPageIPropertyPagethe IPropertyTreeView from which it was removed
Events
StyleChangedEvent
Raised when the user selects a style in the drop-down list, after the style has been set on the object (if any).
public event StyleSelectionProperty.StyleChangedDelegate StyleChangedEvent