cedric conte

cedric conte

  • NA
  • 25
  • 0

How to bind ToolTip to a DisplayAttribute

Apr 12 2012 10:11 AM
Hi,
In my BO, I have added DisplayAttributes to my properties, and would now like to bind the ToolTip property of my TextBox controls to the Description property of the DisplayAttribute.
Is  WPF and silverlight support the DisplayAttribute dataAnnotation ?

Here what I'm trying to do:
In my basic class, I have this property :

[Display(Name = "Description")]
 public string Description { get; set; }

Below the XAML code. Actually, I don't know how to realize the binding with the ToolTip property of my TextBox controls. That's why I have write XXX.

<TextBox Text="{Binding Description}" ToolTip="{Binding XXX}"/>

Thx in advance for your help,
Cedric

Answers (1)