Tooltips on read only properties

Grids for WPF Forum

Posted 13 years ago by Rick Edwards - UK
Version: 11.1.0545
Avatar
Hi all,

I've implemented error support for our PropertyGrid by binding an error template to the IDataErrorInfo in the standard "red box" type validation method, this all works fine and when a property fails validation we see the red outline to the property and get the error message to appear as a tooltip when we mouse over the property editor. However, if the property is flagged as read only and is greyed out we can still get the red border to show but we don't get any tooltip. Can we show tooltips on read only properties and if so any pointers as to where I need to look to get this working?

Thanks

Comments (2)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Rick,

The controls used to present "read-only" properties generally have IsEnabled set to false. You can set ToolTipSerivce.ShowOnDisabled to true on the underlying controls to have it show the tooltips in that case.


Actipro Software Support

Posted 13 years ago by Rick Edwards - UK
Avatar
Thanks, set it as a style extension to the Control base type which worked just fine:

<Style x:Key="controlStyle" TargetType="{x:Type Control}">
    <Setter Property="ToolTipService.ShowOnDisabled" Value="true"/>
</Stryle
The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.