Back to Devexpress

BaseEdit.ErrorToolTipContentTemplate Property

wpf-devexpress-dot-xpf-dot-editors-dot-baseedit-90a4cc35.md

latest2.1 KB
Original Source

BaseEdit.ErrorToolTipContentTemplate Property

Gets or sets a template that presents the content of an editor’s error tooltip. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public DataTemplate ErrorToolTipContentTemplate { get; set; }
vb
Public Property ErrorToolTipContentTemplate As DataTemplate

Property Value

TypeDescription
DataTemplate

A DataTemplate object that represents the data template.

|

Remarks

If an editor’s value is invalid and the data validation mechanism in enabled, an error icon is displayed within the editor. When the mouse pointer hovers over this icon, a tooltip that describes the error is displayed. To change the error tooltop’s content presentation, create a data template and assign it to the ErrorToolTipContentTemplate property.

To learn more, see Input Validation.

Example

The following example shows how to customize the visual representation of an editor’s error tooltip.

xaml
<dxe:DateEdit MaxValue="12/13/2010" MinValue="01/15/2008">
    <dxe:DateEdit.ErrorToolTipContentTemplate>
        <DataTemplate>
            <TextBlock Text="Value is out of borders" Foreground="Red" FontSize="18"/>
        </DataTemplate>
    </dxe:DateEdit.ErrorToolTipContentTemplate>
</dxe:DateEdit>

See Also

BaseEdit Class

BaseEdit Members

DevExpress.Xpf.Editors Namespace