Table of Contents

Class PropertyEditor

Namespace
NanoByte.Common.EtoControls
Assembly
NanoByte.Common.EtoForms.dll

Displays the public properties of an object and optionally allows editing them. A simplified alternative to the Windows Forms PropertyGrid.

public sealed class PropertyEditor : Scrollable, IHandlerSource, IDisposable, IBindable, IMouseInputSource, IKeyboardInputSource, ICallbackSource, IBindableWidgetContainer
Inheritance
object
Widget
BindableWidget
Control
Container
Panel
Scrollable
PropertyEditor
Implements
IHandlerSource
IBindable
IMouseInputSource
IKeyboardInputSource
ICallbackSource
IBindableWidgetContainer
Inherited Members
Scrollable.ScrollEvent
Scrollable.UpdateScrollSizes()
Scrollable.ScrollPosition
Scrollable.ScrollSize
Scrollable.Border
Scrollable.VisibleRect
Scrollable.ExpandContentWidth
Scrollable.ExpandContentHeight
Scrollable.MinimumZoom
Scrollable.MaximumZoom
Scrollable.Zoom
Scrollable.Scroll
Panel.Remove(Control)
Panel.Controls
Panel.Padding
Panel.MinimumSize
Panel.ContextMenu
Panel.Content
Container.RemoveAll()
Container.ClientSize
Container.Children
Container.VisualChildren
Container.StyleProvider
Container.Styles
Control.SizeChangedEvent
Control.KeyDownEvent
Control.KeyUpEvent
Control.TextInputEvent
Control.MouseDownEvent
Control.MouseUpEvent
Control.MouseMoveEvent
Control.MouseLeaveEvent
Control.MouseEnterEvent
Control.MouseDoubleClickEvent
Control.MouseWheelEvent
Control.GotFocusEvent
Control.LostFocusEvent
Control.ShownEvent
Control.ThemeChangedEvent
Control.DragDropEvent
Control.DragOverEvent
Control.DragEnterEvent
Control.DragLeaveEvent
Control.DragEndEvent
Control.EnabledChangedEvent
Control.Invalidate()
Control.Invalidate(Rectangle)
Control.UpdateLayout()
Control.GetPreferredSize()
Control.GetPreferredSize(SizeF)
Control.CaptureMouse()
Control.ReleaseMouseCapture()
Control.Detach()
Control.AttachNative()
Control.DetachNative()
Control.Focus()
Control.SuspendLayout()
Control.ResumeLayout()
Control.PointFromScreen(PointF)
Control.PointToScreen(PointF)
Control.RectangleToScreen(RectangleF)
Control.RectangleFromScreen(RectangleF)
Control.DoDragDrop(DataObject, DragEffects)
Control.DoDragDrop(DataObject, DragEffects, Image, PointF)
Control.TriggerStyleChanged()
Control.Print()
Control.IsDesignMode
Control.Gestures
Control.Loaded
Control.VisualControls
Control.Tag
Control.LogicalParent
Control.IsVisualControl
Control.Size
Control.IsMouseCaptured
Control.Width
Control.Height
Control.Enabled
Control.Visible
Control.Parent
Control.VisualParent
Control.IsAttached
Control.BackgroundColor
Control.HasFocus
Control.IsSuspended
Control.ParentWindow
Control.SupportedPlatformCommands
Control.Bounds
Control.Location
Control.Cursor
Control.ToolTip
Control.TabIndex
Control.TabStop
Control.AllowDrop
Control.SizeChanged
Control.KeyDown
Control.KeyUp
Control.TextInput
Control.MouseDown
Control.MouseUp
Control.MouseMove
Control.MouseLeave
Control.MouseEnter
Control.MouseDoubleClick
Control.MouseWheel
Control.GotFocus
Control.LostFocus
Control.Shown
Control.ThemeChanged
Control.PreLoad
Control.Load
Control.LoadComplete
Control.UnLoad
Control.DragDrop
Control.DragOver
Control.DragEnter
Control.DragLeave
Control.DragEnd
Control.EnabledChanged
BindableWidget.Unbind()
BindableWidget.UpdateBindings(BindingUpdateMode)
BindableWidget.Parents
BindableWidget.DataContext
BindableWidget.Bindings
BindableWidget.IsDataContextChanging
BindableWidget.DataContextChanged
Widget.Dispose()
Widget.ToString()
Widget.Platform
Widget.Handler
Widget.NativeHandle
Widget.Properties
Widget.ID
Widget.Style
Widget.ControlObject
Widget.IsDisposed
Widget.StyleChanged
Extension Methods

Remarks

Respects BrowsableAttribute, CategoryAttribute, DisplayNameAttribute, DescriptionAttribute, DefaultValueAttribute, PasswordPropertyTextAttribute and RangeAttribute. Uses check boxes for bools, drop-downs for enums, numeric steppers for ints and text boxes with TypeConverters for everything else.

Constructors

PropertyEditor()

Creates a new property editor.

public PropertyEditor()

Properties

ReadOnly

Only display the property values, do not allow editing them.

public bool ReadOnly { get; set; }

Property Value

bool

SelectedObject

The object whose properties are displayed; can be null.

public object? SelectedObject { get; set; }

Property Value

object

Methods

CommitPendingChanges()

Applies any text input that has not been committed yet (e.g., because the control still has focus).

public void CommitPendingChanges()

Remarks

Call this before reading the SelectedObject, e.g., when the user clicks an OK button.

RefreshValues()

Updates the displayed values after the SelectedObject was modified externally.

public void RefreshValues()

Events

PropertyValueChanged

Occurs when the user changed a property value.

public event EventHandler? PropertyValueChanged

Event Type

EventHandler