https://github.com/guorg/gu.wpf.tooltips
https://github.com/guorg/gu.wpf.tooltips
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/guorg/gu.wpf.tooltips
- Owner: GuOrg
- License: mit
- Created: 2014-11-29T15:30:43.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-12-25T13:09:45.000Z (over 2 years ago)
- Last Synced: 2025-08-21T21:31:42.312Z (10 months ago)
- Language: C#
- Size: 558 KB
- Stars: 8
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gu.Wpf.ToolTips
[](LICENSE)
[](https://www.nuget.org/packages/Gu.Wpf.ToolTips/)
[](https://ci.appveyor.com/project/JohanLarsson/gu-wpf-tooltips/branch/master)
[](https://dev.azure.com/guorg/Gu.Wpf.ToolTips/_build/latest?definitionId=15&branchName=master)
Helpers for tool tips.
## TouchToolTipService
Tool tips for touch users. Setting `TouchToolTipService.Enabled="True"` on an element draws an OverlayAdorner over the element with an icon indicating that there is touch info.
Tapping opens/closes the tool tip.
#### Simple sample:
```xaml
<Setter Property="Padding" Value="6" />
<Setter Property="toolTips:TouchToolTipService.IsEnabled" Value="False" />
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="toolTips:TouchToolTipService.IsEnabled" Value="True" />
</Trigger>
<Setter Property="toolTips:TouchToolTipService.IsEnabled" Value="True" />
<Setter Property="Padding" Value="6" />
<Setter Property="toolTips:TouchToolTipService.IsEnabled" Value="True" />
<Setter Property="Padding" Value="6" />
```
Renders:

#### OverlayAdorner
The default style for the overlay is:
```xaml
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Ellipse x:Name="TouchInfoIcon"
Height="{Binding RelativeSource={RelativeSource Self},
Path=ActualWidth}"
Width="12"
Canvas.Top="0"
Canvas.Right="0"
Margin="0,2,2,0"
HorizontalAlignment="Right"
VerticalAlignment="Top">
<Ellipse.Fill>
<DrawingBrush>
<DrawingBrush.Drawing>
<DrawingGroup>
<DrawingGroup.Children>
<GeometryDrawing Brush="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}">
<GeometryDrawing.Geometry>
<EllipseGeometry Center="50,50"
RadiusX="50"
RadiusY="50" />
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="White">
<GeometryDrawing.Geometry>
<GeometryGroup>
<RectangleGeometry Rect="43,15,14,15" />
<RectangleGeometry Rect="43,36,14,50" />
</GeometryGroup>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup.Children>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Ellipse.Fill>
</Ellipse>
</ControlTemplate>
</Setter.Value>
</Setter>
```