Udostępnij za pośrednictwem


ContentControl.OnContentTemplateSelectorChanged Method

Definition

Invoked when the value of the ContentTemplateSelector property changes.

void OnContentTemplateSelectorChanged(DataTemplateSelector const& oldContentTemplateSelector, DataTemplateSelector const& newContentTemplateSelector);
protected virtual void OnContentTemplateSelectorChanged(DataTemplateSelector oldContentTemplateSelector, DataTemplateSelector newContentTemplateSelector);
function onContentTemplateSelectorChanged(oldContentTemplateSelector, newContentTemplateSelector)
Protected Overridable Sub OnContentTemplateSelectorChanged (oldContentTemplateSelector As DataTemplateSelector, newContentTemplateSelector As DataTemplateSelector)

Parameters

oldContentTemplateSelector
DataTemplateSelector

The old value of the ContentTemplateSelector property.

newContentTemplateSelector
DataTemplateSelector

The new value of the ContentTemplateSelector property.

Remarks

Classes that derive from ContentControl can override this method in order to perform any custom logic that should apply, in cases where the selector logic that automatically chooses the DataTemplate based on context changes.

Applies to