DataTemplateSelector

StockSharp.Xaml.Charting

Provides the base functionality for template selectors, used by the RolloverModifier and CursorModifier to select an appropriate DataTemplate for the HitTestInfo type outputted by the modifiers (which is dependent on RenderableSeries type)

Inherits: ContentControl

Implements: IDataTemplateSelector

Properties

DefaultTemplate
public DataTemplate DefaultTemplate { get; set; }
value = dataTemplateSelector.DefaultTemplate
dataTemplateSelector.DefaultTemplate = value

Gets or sets the template which is used as default

Methods

OnContentChanged
protected override void OnContentChanged(object oldContent, object newContent)
dataTemplateSelector.OnContentChanged(oldContent, newContent)

Called when the Content property changes.

oldContent
The old value of the Content property.
newContent
The new value of the Content property.
OnDataTemplateChanged
protected void OnDataTemplateChanged()
dataTemplateSelector.OnDataTemplateChanged()

Raises the DataTemplateChanged event

SelectTemplate
public virtual DataTemplate SelectTemplate(object item, DependencyObject container)
result = dataTemplateSelector.SelectTemplate(item, container)

When overidden in derived classes, contains the logic for choosing a proper DataTemplate

item
container
UpdateControlTemplate
protected void UpdateControlTemplate()
dataTemplateSelector.UpdateControlTemplate()

Forces an update of ControlTemplate due to known bug in Wpf 4

Events

DataTemplateChanged
public event EventHandler DataTemplateChanged
dataTemplateSelector.DataTemplateChanged += handler

Raised when one of DataTemplate properties changed

Fields

DefaultTemplateProperty
public static readonly DependencyProperty DefaultTemplateProperty
value = DataTemplateSelector.DefaultTemplateProperty

Defines the DefaultTemplate DependencyProperty