Version

GetExternalContext Method (EmbeddableEditorOwnerBase)

Returns an object that may be provided to the programmer using an editor.
Syntax
'Declaration
 
Public Overridable Function GetExternalContext( _
   ByVal ownerContext As Object _
) As Object
public virtual object GetExternalContext( 
   object ownerContext
)

Parameters

ownerContext
The context that was passed into the GetEmbeddableElement(UIElement,EmbeddableEditorOwnerBase,Object,EmbeddableUIElementBase) method.

Return Value

An object that the programmer may use to determine which object was associated with an action.
Remarks

The EmbeddableUIElementBase.OwnerContext is provided to the editor when it creates or reinitializes an embeddable uielement. The embeddable element in turn uses that information when making requests to the owner for information but the editor. That object is opaque to the editor but provides context to the owner so that it knows which object the editor is dealing with. An owner may change the contents of the OwnerContext or the object may not be useful to the programmer using an editor. For example, a CellUIElement may be the OwnerContext for a grid's cell editor but that isn't normally the level of information that the programmer would need. The programmer needs a Cell object and shouldn't be expected to extract that from the OwnerContext. Instead, an editor will ask the owner via this method to translate the OwnerContext to something that the programmer can use.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also