Table of Contents

Class PropertyPage

Namespace
CADability.Forms
Assembly
CADability.Forms.dll
public class PropertyPage : ScrollableControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IPropertyPage
Inheritance
PropertyPage
Implements
Inherited Members

Constructors

PropertyPage(string, int, PropertiesExplorer)

public PropertyPage(string titleId, int iconId, PropertiesExplorer propExplorer)

Parameters

titleId string
iconId int
propExplorer PropertiesExplorer

Properties

ActiveView

The active view of the frame. Kept for the older entries, use ActiveView instead.

public IView ActiveView { get; }

Property Value

IView

Frame

The frame the page belongs to (the frame of its control center). Entries use it to reach the project, the active view and the UI services.

public IFrame Frame { get; set; }

Property Value

IFrame

IconId

public int IconId { get; }

Property Value

int

TitleId

public string TitleId { get; }

Property Value

string

Methods

Add(IPropertyEntry, bool)

Appends a root entry to the page and selects it. The entry gets Added(IPropertyPage), and its Parent is set to the page.

public void Add(IPropertyEntry toAdd, bool showOpen)

Parameters

toAdd IPropertyEntry

the entry to add

showOpen bool

true: also open the entry so that its sub entries are shown

Clear()

Removes all entries from the page.

public void Clear()

ContainsEntry(IPropertyEntry)

Tells whether the entry is currently displayed on this page, as a root entry or as a sub entry of an open entry.

public bool ContainsEntry(IPropertyEntry toTest)

Parameters

toTest IPropertyEntry

Returns

bool

true when the entry is displayed on this page

Dispose(bool)

protected override void Dispose(bool disposing)

Parameters

disposing bool

Finds an entry by its ResourceId (or, for an entry without resource id, by its label). The displayed entries are searched first; with searchTreeAndOpen the sub entries of closed entries are searched as well (FindSubItem(string)). Despite the name the found entry is not opened or selected.

public IPropertyEntry FindFromHelpLink(string helpResourceID, bool searchTreeAndOpen)

Parameters

helpResourceID string

the resource id (or label text) of the entry

searchTreeAndOpen bool

true: also search entries that are not displayed because their parent is closed

Returns

IPropertyEntry

the entry, or null when there is none

GetCurrentSelection()

Returns the selected entry of the page, the same as Selected.

public IPropertyEntry GetCurrentSelection()

Returns

IPropertyEntry

the selected entry, or null when none is selected

GetFrame()

Returns the frame the page belongs to. Kept for the older entries, use Frame instead.

public IFrame GetFrame()

Returns

IFrame

the frame

GetParent(IShowProperty)

Returns the parent entry of the given entry. Kept for the older entries, use Parent instead.

public IPropertyEntry GetParent(IShowProperty child)

Parameters

child IShowProperty

the entry whose parent is wanted

Returns

IPropertyEntry

the parent entry, or null for a root entry (whose parent is the page)

IsOnTop()

Tells whether this page is the active page of the control center, i.e. the one whose tab is selected and which the user sees.

public bool IsOnTop()

Returns

bool

true when this page is in front

IsOpen(IShowProperty)

Tells whether the sub entries of the entry are shown. Kept for the older entries, use IsOpen instead.

public bool IsOpen(IShowProperty toTest)

Parameters

toTest IShowProperty

the entry to test

Returns

bool

true when the entry is open

LabelChanged(int)

public void LabelChanged(int index)

Parameters

index int

MakeVisible(IPropertyEntry)

Scrolls the page so that the entry is in view. The entry must be displayed, i.e. its parents must be open.

public void MakeVisible(IPropertyEntry toShow)

Parameters

toShow IPropertyEntry

the entry to scroll to

OnMouseClick(MouseEventArgs)

protected override void OnMouseClick(MouseEventArgs e)

Parameters

e MouseEventArgs

OnMouseDoubleClick(MouseEventArgs)

protected override void OnMouseDoubleClick(MouseEventArgs e)

Parameters

e MouseEventArgs

OnMouseDown(MouseEventArgs)

protected override void OnMouseDown(MouseEventArgs e)

Parameters

e MouseEventArgs

OnMouseMove(MouseEventArgs)

protected override void OnMouseMove(MouseEventArgs e)

Parameters

e MouseEventArgs

OnMouseUp(MouseEventArgs)

protected override void OnMouseUp(MouseEventArgs e)

Parameters

e MouseEventArgs

OnPaint(PaintEventArgs)

protected override void OnPaint(PaintEventArgs e)

Parameters

e PaintEventArgs

OnSizeChanged(EventArgs)

protected override void OnSizeChanged(EventArgs e)

Parameters

e EventArgs

OpenSubEntries(IPropertyEntry, bool)

Opens or closes the entry, i.e. shows or hides its sub entries. Opening an entry that is already open rebuilds its sub entries, which serves as a refresh after the sub entries changed.

public void OpenSubEntries(IPropertyEntry toOpenOrClose, bool open)

Parameters

toOpenOrClose IPropertyEntry

the entry, it must be displayed on the page

open bool

true: show the sub entries, false: hide them

Refresh(IPropertyEntry)

Redraws the entry after its label, value or flags changed. When the entry is open, its sub entries are collected again, so a changed SubItems array is reflected as well. When the entry is being edited, the text box is updated with its new Value.

public void Refresh(IPropertyEntry toRefresh)

Parameters

toRefresh IPropertyEntry

the entry to redisplay

Refresh(int)

public void Refresh(int index)

Parameters

index int

Remove(IPropertyEntry)

Removes a root entry (one that was added with Add(IPropertyEntry, bool)) from the page. An edit in progress is ended first; the entry and its displayed sub entries get Removed(IPropertyPage).

public void Remove(IPropertyEntry toRemove)

Parameters

toRemove IPropertyEntry

the root entry to remove

SelectEntry(IPropertyEntry)

Selects the entry, the same as setting Selected; null is ignored. The page is not brought to the front.

public void SelectEntry(IPropertyEntry toSelect)

Parameters

toSelect IPropertyEntry

the entry to select, it must be displayed on the page

StartEditLabel(IPropertyEntry)

Opens the text box on the label of the entry, e.g. to let the user name a newly created item. The entry gets StartEdit(bool) with false and, when the edit ends, EndEdit(bool, bool, string).

public void StartEditLabel(IPropertyEntry ToEdit)

Parameters

ToEdit IPropertyEntry

the entry whose label is edited, it must be displayed on the page

ValueChanged(int)

public void ValueChanged(int index)

Parameters

index int

Events

OnPreProcessKeyDown

Raised for a key pressed while this page is active which neither the action nor the control center handled (see PreProcessKeyDown). An entry may subscribe to react to keys while it is displayed.

public event PreProcessKeyDown OnPreProcessKeyDown

Event Type

PreProcessKeyDown

OnSelectionChanged

Raised after the selected entry of the page changed; the handler gets the previously and the newly selected entry, either of which may be null (see SelectionChanged).

public event SelectionChanged OnSelectionChanged

Event Type

SelectionChanged