DataTemplateExtensions.

FindDataTemplate(IControl, object, IDataTemplate) Method

Summary

Find a data template that matches a piece of data.

Syntax

public static IDataTemplate FindDataTemplate(this IControl control, object data, IDataTemplate primary = null)

Parameters

Name Type Description
control IControl The control searching for the data template.
data object The data.
primary IDataTemplate An optional primary template that can will be tried before the DataTemplates in the tree are searched.

Return Value

Type Description
IDataTemplate The data template or null if no matching data template was found.