An implementation of a context object that can be used to accomplish data binding in the scenario of IUIElementStyle<(Of <(<'TModelItem>)>)>s.

Namespace: yWorks.yFiles.UI.Drawing
Assembly: yWorks.yFilesWPF.Viewer (in yWorks.yFilesWPF.Viewer.dll) Version: 2.2.0.2 (2.2.0.2)

Syntax

C#
public class UIElementStyleDataContext<TModelItem> : INotifyPropertyChanged
where TModelItem : class, IModelItem
Visual Basic
Public Class UIElementStyleDataContext(Of TModelItem As {Class, IModelItem}) _
	Implements INotifyPropertyChanged

Type Parameters

TModelItem
The type for which this context has been created.

Remarks

Instances of this class (and specialized subclasses) are used by the various IStyleRenderer<(Of <(<'TModelItem, TStyle>)>)> implementations in this framework that create the visual representation of items that have been associated with IUIElementStyle<(Of <(<'TModelItem>)>)> styles. A typical implementation of these renderer instances creates a subclass of this instance and assigns it to the DataContext property of the visual tree that is created by the templating mechanism. This context provides data bindable access to a Selected, a Highlighted and a Focused property, as well as access to a user tag, the item itself, the style instance, and the tag associated with the style. Also the Canvas, the element has been created for can be queried.

Inheritance Hierarchy

See Also