Class DimensionStyleSelectionProperty
- Namespace
- CADability.UserInterface
- Assembly
- CADability.dll
Property entry (a drop-down list in the control center) to choose the DimensionStyle of an object implementing IDimensionStyle, e.g. a Dimension or a Style. The choices are the names of those styles of a DimensionStyleList that apply to the given Dimension.EDimType, optionally preceded by an "undefined" entry. Selecting an entry sets the style of the object and raises DimensionStyleChangedEvent.
public class DimensionStyleSelectionProperty : MultipleChoiceProperty, IPropertyEntry, IShowProperty
- Inheritance
-
DimensionStyleSelectionProperty
- Implements
- Inherited Members
Constructors
DimensionStyleSelectionProperty(string, DimensionStyleList, IDimensionStyle, EDimType, bool)
Creates the entry for the dimension style of dimensionStyle. The current style of the object is
preselected; if the object is an IGeoObject, the entry follows changes of its dimension style.
public DimensionStyleSelectionProperty(string resourceId, DimensionStyleList list, IDimensionStyle dimensionStyle, Dimension.EDimType dimType, bool includeUndefined)
Parameters
resourceIdstringResource id of the label text
listDimensionStyleListThe list of all dimension styles of the project
dimensionStyleIDimensionStyleThe object whose dimension style is edited
dimTypeDimension.EDimTypeOnly styles which support this type of dimension are offered; DimAll offers all of them. When no style fits, the default style is offered
includeUndefinedbooltrue: an "undefined" entry (resource "DimensionStyle.Undefined") is offered as the first choice
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 propertyTreeView)
Parameters
propertyTreeViewIPropertyPage
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 propertyTreeView)
Parameters
propertyTreeViewIPropertyPagethe IPropertyTreeView from which it was removed
Events
DimensionStyleChangedEvent
Raised after the user has selected a dimension style and it was set on the IDimensionStyle object.
public event DimensionStyleSelectionProperty.DimensionStyleChangedDelegate DimensionStyleChangedEvent