Show / Hide Table of Contents

Class EditableProperty<T>

Defines a base clas for editable properties shown on a property page (IPropertyPage) in the controlcenter (properties explorer). It is a single entry in the property page which may have subentries. Usually a property of type T of some object is connected with this EditableProperty, e.g. the startpoint of a line or the distance of hatch lines or some setting value. The communication with the object which hold the property is either done via delegates or via reflection. When the user clicks on the value part of the IPropertyEntry, an editbox is activated to edit the value of the property. There must be a ValueToText(T) and TextToValue(String, out T) method defined in the derived class, which convert the property value in a string and vice versa. The value of the property may be changed by the editbox (typing) or from the outside.

Inheritance
System.Object
PropertyEntryImpl
EditableProperty<T>
AngleProperty
DoubleProperty
GeoPointProperty
GeoVectorProperty
LengthProperty
StringProperty
Implements
IPropertyEntry
IShowProperty
IConstructProperty
Inherited Members
PropertyEntryImpl.resourceId
PropertyEntryImpl.labelText
PropertyEntryImpl.PropertyEntryChangedState(StateChangedArgs)
PropertyEntryImpl.Frame
PropertyEntryImpl.Refresh()
PropertyEntryImpl.propertyPage
PropertyEntryImpl.propertyTreeView
PropertyEntryImpl.IsOpen
PropertyEntryImpl.Label
PropertyEntryImpl.LabelText
PropertyEntryImpl.ResourceId
PropertyEntryImpl.Parent
PropertyEntryImpl.Index
PropertyEntryImpl.IndentLevel
PropertyEntryImpl.SubItems
PropertyEntryImpl.DeferUpdate
PropertyEntryImpl.PropertyEntryChangedStateEvent
PropertyEntryImpl.ButtonClicked(PropertyEntryButton)
PropertyEntryImpl.GetDropDownList()
PropertyEntryImpl.ListBoxSelected(Int32)
PropertyEntryImpl.Opened(Boolean)
PropertyEntryImpl.OpenOrCloseSubEntries()
PropertyEntryImpl.Removed(IPropertyPage)
PropertyEntryImpl.Select()
PropertyEntryImpl.Selected(IPropertyEntry)
PropertyEntryImpl.UnSelected(IPropertyEntry)
PropertyEntryImpl.ReadOnly
PropertyEntryImpl.StateChangedEvent
PropertyEntryImpl.IShowProperty.LabelText
PropertyEntryImpl.IShowProperty.HelpLink
PropertyEntryImpl.IShowProperty.InfoText
PropertyEntryImpl.IShowProperty.LabelType
PropertyEntryImpl.IShowProperty.EntryType
PropertyEntryImpl.SubEntriesCount
PropertyEntryImpl.SubEntries
PropertyEntryImpl.IShowProperty.OwnerDrawHeight
PropertyEntryImpl.IShowProperty.Hidden
PropertyEntryImpl.IShowProperty.IsSelected
PropertyEntryImpl.IShowProperty.Added(IPropertyTreeView)
PropertyEntryImpl.IShowProperty.Selected()
PropertyEntryImpl.IShowProperty.UnSelected()
PropertyEntryImpl.IShowProperty.ChildSelected(IShowProperty)
PropertyEntryImpl.Concat(IPropertyEntry[], IPropertyEntry[])
PropertyEntryImpl.IShowProperty.Removed(IPropertyTreeView)
PropertyEntryImpl.IShowProperty.ShowOpen(Boolean)
PropertyEntryImpl.IShowProperty.SetTabIndex(Int32)
PropertyEntryImpl.IShowProperty.LabelChanged(String)
PropertyEntryImpl.IShowProperty.SetFocus()
PropertyEntryImpl.IShowProperty.Refresh()
PropertyEntryImpl.IShowProperty.OnEnterPressed()
PropertyEntryImpl.IShowProperty.OnVisibilityChanged(Boolean)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CADability.UserInterface
Assembly: CADability.dll
Syntax
public abstract class EditableProperty<T> : PropertyEntryImpl, IPropertyEntry, IShowProperty, IConstructProperty
Type Parameters
Name Description
T

Constructors

| Improve this Doc View Source

EditableProperty(EditableProperty<T>.GetValueDelegate, EditableProperty<T>.SetValueDelegate, String, String)

Creates an editable property entry (for the control center), which communicates with the object (which holds the property) via delegates.

Declaration
public EditableProperty(EditableProperty<T>.GetValueDelegate getValueDelegate, EditableProperty<T>.SetValueDelegate setValueDelegate, string resourceId = null, string contextMenuId = null)
Parameters
Type Name Description
EditableProperty.GetValueDelegate<> getValueDelegate

Get the value of the property from the object, which holds the property

EditableProperty.SetValueDelegate<> setValueDelegate

Set the value of th eproperty

System.String resourceId

A resource id for the text of the label

System.String contextMenuId
| Improve this Doc View Source

EditableProperty(Object, String, String, String)

Creates an editable property entry (for the control center), which communicates with the object (which holds the property) via reflection. The object must have an accessible property with the provided getSetProperty name.

Declaration
public EditableProperty(object objectWithProperty, string getSetProperty, string resourceId = null, string contextMenuId = null)
Parameters
Type Name Description
System.Object objectWithProperty

The object, which holds the property

System.String getSetProperty

The Name of the property

System.String resourceId

A resource id for the text of the label

System.String contextMenuId
| Improve this Doc View Source

EditableProperty(String, String)

Creates an EditableProperty without specifying the communication with the object holding the property. This must be specified before using the object by setting OnGetValue and OnSetValue

Declaration
public EditableProperty(string resourceId = null, string contextMenuId = null)
Parameters
Type Name Description
System.String resourceId
System.String contextMenuId

Fields

| Improve this Doc View Source

hotspotPosition

Declaration
protected GeoPoint hotspotPosition
Field Value
Type Description
GeoPoint
| Improve this Doc View Source

LabelTextChanged

Declaration
public EditableProperty<T>.LabelChangedDelegate LabelTextChanged
Field Value
Type Description
EditableProperty.LabelChangedDelegate<>
| Improve this Doc View Source

LockedChanged

Declaration
public EditableProperty<T>.LockedChangedDelegate LockedChanged
Field Value
Type Description
EditableProperty.LockedChangedDelegate<>
| Improve this Doc View Source

ModifyWithMouse

Declaration
public ModifyWithMouseDelegate ModifyWithMouse
Field Value
Type Description
ModifyWithMouseDelegate

Properties

| Improve this Doc View Source

ContextMenu

Declaration
public override MenuWithHandler[] ContextMenu { get; }
Property Value
Type Description
MenuWithHandler[]
Overrides
PropertyEntryImpl.ContextMenu
| Improve this Doc View Source

Flags

Override for more functionality. Only returns PropertyEntryType.ValueEditable and PropertyEntryType.LabelEditable if apropriate

Declaration
public override PropertyEntryType Flags { get; }
Property Value
Type Description
PropertyEntryType
Overrides
PropertyEntryImpl.Flags
| Improve this Doc View Source

Highlight

Declaration
public bool Highlight { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsSelected

Declaration
public bool IsSelected { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

LabelIsEditable

Declaration
public bool LabelIsEditable { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Lockable

Declaration
public bool Lockable { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Locked

Declaration
public bool Locked { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

OnGetValue

Declaration
public EditableProperty<T>.GetValueDelegate OnGetValue { set; }
Property Value
Type Description
EditableProperty.GetValueDelegate<>
| Improve this Doc View Source

OnSetValue

Declaration
public EditableProperty<T>.SetValueDelegate OnSetValue { set; }
Property Value
Type Description
EditableProperty.SetValueDelegate<>
| Improve this Doc View Source

PrependContextMenu

additional menu items for the context menu

Declaration
public MenuWithHandler[] PrependContextMenu { set; }
Property Value
Type Description
MenuWithHandler[]
| Improve this Doc View Source

ShowMouseButton

Declaration
public bool ShowMouseButton { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

UserData

Declaration
public UserData UserData { get; }
Property Value
Type Description
UserData
| Improve this Doc View Source

Value

Declaration
public override string Value { get; }
Property Value
Type Description
System.String
Overrides
PropertyEntryImpl.Value

Methods

| Improve this Doc View Source

Added(IPropertyPage)

Declaration
public override void Added(IPropertyPage pp)
Parameters
Type Name Description
IPropertyPage pp
Overrides
PropertyEntryImpl.Added(IPropertyPage)
| Improve this Doc View Source

EditTextChanged(String)

Declaration
public override bool EditTextChanged(string newValue)
Parameters
Type Name Description
System.String newValue
Returns
Type Description
System.Boolean
Overrides
PropertyEntryImpl.EditTextChanged(String)
| Improve this Doc View Source

EndEdit(Boolean, Boolean, String)

Declaration
public override void EndEdit(bool aborted, bool modified, string newValue)
Parameters
Type Name Description
System.Boolean aborted
System.Boolean modified
System.String newValue
Overrides
PropertyEntryImpl.EndEdit(Boolean, Boolean, String)
| Improve this Doc View Source

FireModifyWithMouse(Boolean)

Declaration
public void FireModifyWithMouse(bool start)
Parameters
Type Name Description
System.Boolean start
| Improve this Doc View Source

GetConnectedObject()

Declaration
public object GetConnectedObject()
Returns
Type Description
System.Object
| Improve this Doc View Source

GetConnectedPropertyName()

Declaration
public string GetConnectedPropertyName()
Returns
Type Description
System.String
| Improve this Doc View Source

GetContextMenuId()

Declaration
protected string GetContextMenuId()
Returns
Type Description
System.String
| Improve this Doc View Source

GetHotspotPosition()

Declaration
public GeoPoint GetHotspotPosition()
Returns
Type Description
GeoPoint
| Improve this Doc View Source

GetValue()

Tries to get the value of the property beeing handled from the object

Declaration
protected T GetValue()
Returns
Type Description
T
| Improve this Doc View Source

LabelChanged(String)

Declaration
protected virtual void LabelChanged(string newText)
Parameters
Type Name Description
System.String newText
| Improve this Doc View Source

SetContextMenu(String, ICommandHandler)

Declaration
public void SetContextMenu(string contextMenuId, ICommandHandler contextMenuHandler)
Parameters
Type Name Description
System.String contextMenuId
ICommandHandler contextMenuHandler
| Improve this Doc View Source

SetFocus()

Declaration
public void SetFocus()
| Improve this Doc View Source

SetHotspotPosition(GeoPoint)

Declaration
public void SetHotspotPosition(GeoPoint Here)
Parameters
Type Name Description
GeoPoint Here
| Improve this Doc View Source

SetValue(T, Boolean)

Called, when the editbox or some other mechanism has a new value for the property. Transfers this value to the object holding the property.

Declaration
protected void SetValue(T val, bool notify)
Parameters
Type Name Description
T val
System.Boolean notify
| Improve this Doc View Source

StartEdit(Boolean)

Only handles value editing. If the label may also be edited, override this method and call this base implementation;

Declaration
public override void StartEdit(bool editValue)
Parameters
Type Name Description
System.Boolean editValue
Overrides
PropertyEntryImpl.StartEdit(Boolean)
| Improve this Doc View Source

StartModifyWithMouse()

Declaration
public void StartModifyWithMouse()
| Improve this Doc View Source

TextToValue(String, out T)

Converts the text to a value. Returns true if possible, false otherwise (maybe invalid characters or outside the limit)

Declaration
protected abstract bool TextToValue(string text, out T val)
Parameters
Type Name Description
System.String text
T val
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ValueToText(T)

Returns the text representation of the value.

Declaration
protected abstract string ValueToText(T val)
Parameters
Type Name Description
T val
Returns
Type Description
System.String

Implements

IPropertyEntry
IShowProperty
IConstructProperty
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX