A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

34 lines
1.4 KiB

<UserControl xmlns="https://github.com/avaloniaui">
<StackPanel Orientation="Vertical"
Gap="4">
<TextBlock Classes="h1">ToolTip</TextBlock>
<TextBlock Classes="h2">A control which pops up a hint when a control is hovered</TextBlock>
<StackPanel Orientation="Horizontal"
Margin="0,16,0,0"
HorizontalAlignment="Center"
Gap="16">
<CheckBox IsChecked="{Binding ElementName=Border, Path=(ToolTip.IsOpen)}"
Content="Show ToolTip" />
<Border Name="Border"
Background="{StyleResource ThemeAccentBrush}"
Margin="5"
Padding="50"
ToolTip.Placement="Bottom">
<ToolTip.Tip>
<StackPanel>
<TextBlock Classes="h1">ToolTip</TextBlock>
<TextBlock Classes="h2">A control which pops up a hint when a control is hovered</TextBlock>
</StackPanel>
</ToolTip.Tip>
<TextBlock>Hover Here</TextBlock>
</Border>
<Border Background="{StyleResource ThemeAccentBrush}"
Margin="5"
Padding="50"
ToolTip.Tip="Another tip">
<TextBlock>And Here</TextBlock>
</Border>
</StackPanel>
</StackPanel>
</UserControl>