Table of Contents

Class PropertiesPanel

Namespace
Icy.Design.Editor.Panels
Assembly
IcyUI.Design.dll

Shows and edits the properties of an EditorSession's selected element. Every edit becomes an undoable markup change.

public class PropertiesPanel : ContentControl, INotifyPropertyChanging, IBindingTarget, INotifyPropertyChanged, INotifyFocusChanged, IContainerLayout
Inheritance
PropertiesPanel
Implements
Inherited Members
Extension Methods

Remarks

The panel follows SelectionChanged, and refreshes its values whenever the selected element's document changes, whether from this panel, a drag in the editor frame, an undo or new text. It does no per-frame work.

It listens to the session only while it's on a canvas, so a panel that was removed doesn't keep reacting to edits (or stay reachable from the session). Adding it back catches up with the current selection.

Place it anywhere: in an EditorOverlay dock, an EditorWorkspace, or your own debug page.

Constructors

PropertiesPanel()

Initializes a new instance of the PropertiesPanel class.

public PropertiesPanel()

Properties

Grid

Gets the grid the panel shows the properties in.

public PropertyGrid Grid { get; }

Property Value

PropertyGrid

Session

Gets or sets the session whose selection the panel shows, or null for an empty panel.

public EditorSession? Session { get; set; }

Property Value

EditorSession

StatusText

Gets the status line: the editor's last refusal, or the focused row's validation reason or description, or empty.

public string StatusText { get; }

Property Value

string

Methods

OnAttached()

Raises the Attached event.

protected override void OnAttached()

Remarks

Propagates Canvas to every element in GetVisualChildren() - this is what makes attaching a whole pre-built subtree (the common pattern: build children, then attach the root once via Add(UIElement)) reach every descendant, not just the immediate root. Each child's own Canvas setter recurses into its children the same way, so this walks the full subtree regardless of depth. Container-specific child-add paths (e.g. OnChildAdded(object?, GenericEventArgs<UIElement>)) still assign Canvas directly for children added after the parent is already attached - this cascade is what covers everything built beforehand.

OnDetached()

Raises the Detached event.

protected override void OnDetached()

Remarks

Propagates null to every element in GetVisualChildren(), mirroring OnAttached() - see its remarks.