New to Telerik UI for WinForms? Start a free 30-day trial

Associates a mention data type with the visual-item type used to render its suggestions.

Definition

Namespace:Telerik.WinForms.Documents.UI.Mentions

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class DataTemplate

Inheritance: objectDataTemplate

Constructors

Creates a new DataTemplate instance. This object maps a visual type to a data type.

C#
public DataTemplate(Type visualType, Type dataType)
Parameters:visualTypeType

The type of the visual item.

dataTypeType

The data type for which the visual item is intended.

Properties

Gets the exact data type for which this template is selected.

C#
public Type DataType { get; }

Gets the visual-item type used to render matching mention data.

C#
public Type VisualType { get; }

The type must provide a public parameterless constructor because the picker instantiates it when displaying suggestions.