Table of Contents

Class CheckProperty

Namespace
CADability.UserInterface
Assembly
CADability.dll

Property page entry with a check box. It either holds its own check state or reflects a boolean or CheckState property of another object, which is read and written via reflection (see the constructors). Clicking the box toggles the state (an indeterminate state is left unchanged) and raises CheckStateChangedEvent. Used e.g. for the visible layers of a view and for the entries of the attribute filters.

public class CheckProperty : IShowPropertyImpl, IShowProperty, IPropertyEntry
Inheritance
CheckProperty
Implements
Inherited Members

Constructors

CheckProperty(object, string, string)

Creates an entry which reflects a property of ObjectWithProperty via reflection. The object must either have a property named PropertyName of type bool or CheckState, or a pair of methods "Get" + PropertyName(string) and "Set" + PropertyName(string, bool), which receive the label text of the entry to identify it.

public CheckProperty(object ObjectWithProperty, string PropertyName, string resourceId)

Parameters

ObjectWithProperty object

The object holding the property

PropertyName string

Name of the property, or the suffix of the Get/Set methods

resourceId string

Resource id of the label text

CheckProperty(string, CheckState)

Creates an entry which holds its own check state. Changes are reported by CheckStateChangedEvent.

public CheckProperty(string resourceID, CheckState state)

Parameters

resourceID string

Resource id of the label text

state CheckState

The initial check state

Properties

Flags

Overrides EntryType, returns Control.

public override PropertyEntryType Flags { get; }

Property Value

PropertyEntryType

Value

Implementation of Value: the text shown in the value column. The default is null, which means the entry has no value column; entries that show a value override it.

public override string Value { get; }

Property Value

string

Methods

ButtonClicked(PropertyEntryButton)

Implementation of ButtonClicked(PropertyEntryButton). The base implementation throws a NotImplementedException; an entry whose Flags announce a button (OK, cancel, check box, lock symbol, direct menu, value as button) must override it.

public override void ButtonClicked(PropertyEntryButton button)

Parameters

button PropertyEntryButton

the button that was clicked

Update()

Refreshes the display of the entry, e.g. after the check state of the connected object was changed from elsewhere.

public void Update()

Events

CheckStateChangedEvent

Raised when the user has clicked the check box and the state was toggled.

public event CheckProperty.CheckStateChangedDelegate CheckStateChangedEvent

Event Type

CheckProperty.CheckStateChangedDelegate