#863 – Tooltips Are Normally Not Shown when a Control Is Disabled
July 15, 2013 2 Comments
By default, a tooltip will not be shown if you hover over a control that is disabled. This makes sense–if you can’t interact with a control, you probably don’t need to see whatever additional information the tooltip is providing. (Although you might make the argument that a tooltip could provide information about why a particular control is disabled).
In the code below, the first button has its IsEnabled property set to false, which means that its tooltip won’t be shown when you hover over it at runtime.
<StackPanel Margin="15"> <Button Content="Hemingway" IsEnabled="False" Margin="5" Padding="10,5" HorizontalAlignment="Center" ToolTip="Ernest Hemingway (1899-1961)"/> <Button Content="Fitzgerald" Margin="5" Padding="10,5" HorizontalAlignment="Center" ToolTip="F. Scott Fitzgerald (1896-1940)"/> </StackPanel>
If you do want the tooltip to be displayed when the parent control is disabled, you can set the ToolTipService.ShowOnDisabled property to true.
Pingback: WPF: How to show Tooltips of disabled control | Around computing
Pingback: Dew Drop – July 15, 2013 (#1,585) | Alvin Ashcraft's Morning Dew