Table of Contents

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

resourceId string

Resource id of the label text

list DimensionStyleList

The list of all dimension styles of the project

dimensionStyle IDimensionStyle

The object whose dimension style is edited

dimType Dimension.EDimType

Only styles which support this type of dimension are offered; DimAll offers all of them. When no style fits, the default style is offered

includeUndefined bool

true: 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

propertyTreeView IPropertyPage

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

selected string

The selected text

Removed(IPropertyPage)

public override void Removed(IPropertyPage propertyTreeView)

Parameters

propertyTreeView IPropertyPage

the 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

Event Type

DimensionStyleSelectionProperty.DimensionStyleChangedDelegate