Table of Contents

Class InlineObjectEditor

Namespace
Tudormobile.Wpf.Controls
Assembly
Tudormobile.WpfControls.dll

Implements a ContentControl exposes an 'Editor' UI (the Content property) below a expandable header. The DisplayMemberPath indicates what displays in the header. Suitable for use in ItemsControls (ItemTemplates) where DataContext is automatically set to the individual item.

public class InlineObjectEditor : ContentControl, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild
Inheritance
InlineObjectEditor
Implements
Inherited Members

Remarks

Not sure if this control will remain implemented this way. It may become a HeaderedContentControl in which the Header can be bound rather than the DisplayMemberPath property use. As it is, this element can be tricky to wire up properly.

Fields

ClosedEvent

Closed Routed Event.Raised when the user completes inline editing.

public static readonly RoutedEvent ClosedEvent

Field Value

RoutedEvent

OpenedEvent

Closed Routed Event.Raised when the user completes inline editing.

public static readonly RoutedEvent OpenedEvent

Field Value

RoutedEvent

Properties

DisplayMemberPath

Gets or sets a path to a value on the source object to serve as the visual representation of the object.

public string DisplayMemberPath { get; set; }

Property Value

string

GlyphLocation

Location of the pencil/edit glyph (if any) relative to the header text.

public InlineObjectEditor.GlyphLocations GlyphLocation { get; set; }

Property Value

InlineObjectEditor.GlyphLocations

IsOpen

True if editor content is 'Open' (expanded); otherwise false.

public bool IsOpen { get; set; }

Property Value

bool

Methods

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnClosed()

Raises the OnClosed event.

protected virtual void OnClosed()

OnClosing(CancelEventArgs)

Raises the OnClosingEvent. Allows cancel of the subsequent 'Close" event via the CancelEventArgs.

protected virtual void OnClosing(CancelEventArgs args)

Parameters

args CancelEventArgs

Event arguments allowing for cancellation of the close.

OnIsOpenChanged(DependencyPropertyChangedEventArgs)

Raised when the IsOpen property is changed.

protected virtual void OnIsOpenChanged(DependencyPropertyChangedEventArgs args)

Parameters

args DependencyPropertyChangedEventArgs

Event arguments.

OnOpened()

Raises the OnOpened event.

protected virtual void OnOpened()

Events

Closed

Closed Routed Event.Raised when the user completes inline editing.

public event RoutedEventHandler Closed

Event Type

RoutedEventHandler

Closing

Event raised when the Editor is closing. You can cancel the 'Close' after data validation (for example).

public event CancelEventHandler? Closing

Event Type

CancelEventHandler

Opened

Closed Routed Event.Raised when the user completes inline editing.

public event RoutedEventHandler Opened

Event Type

RoutedEventHandler