This is a migrated thread and some comments may be shown as answers.

Tooltips for RadPropertyGrid Items

2 Answers 254 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Maurizio
Top achievements
Rank 2
Maurizio asked on 13 Jan 2015, 08:43 AM
We have a RadPropertyGrid with its items being auto-generated.

How can I set Tooltips to the labels and/or to the editors being generated???

Tooltips should be set inside auto-generation 

2 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 14 Jan 2015, 03:51 PM
Hello Peter,

I can suggest you the following steps to set Tooltips to the Labels and Editors of the PropertyGrid:

1.   Add a Name of your PropertyGrid in your XAML code:
<telerik:RadPropertyGrid  x:Name="PropertyGrid1"/>

2.   Attach an EventHandler for the FieldLoaded event of the PropertyGrid in the code behind of your application:
this.PropertyGrid1.FieldLoaded += PropertyGrid1_FieldLoaded;

3.   Set ToolTips in the EventHandler method for the Labels and the Editors of the PropertyGrid:
void PropertyGrid1_FieldLoaded(object sender,
         Telerik.Windows.Controls.Data.PropertyGrid.FieldEventArgs e)

{

   //ToolTip for the Editors

   ToolTip editorToolTip =
new ToolTip();

   editorToolTip.Content =
"Your Editor Content";

   ToolTipService.SetToolTip(e.Field.Content
as FrameworkElement, editorToolTip)

   //ToolTip for the Labels

   ToolTip labelToolTip =
new ToolTip();

   labelToolTip.Content =
"Your Label Content";

   ToolTipService.SetToolTip(e.Field.Label
as FrameworkElement, labelToolTip);

}

Let me know how this works for you.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Maurizio
Top achievements
Rank 2
answered on 26 Jan 2015, 01:48 PM
Thanks, Stefan!

It works fine.

Regards from Düsseldorf, Germany
Tags
PropertyGrid
Asked by
Maurizio
Top achievements
Rank 2
Answers by
Stefan
Telerik team
Maurizio
Top achievements
Rank 2
Share this question
or