動作環境
Windows 7 Pro (32bit)
Microsoft Visual Studio 2017 Community
Sublime Text 2
@ WPF 4.5入門 by 大田一希さん
No.4994 / 9985
ToolTipコントロールは、マウスをコントロール上に置いたときに補助的な情報を表示するためのコントロールです。
試してみた。
XAML
<Window x:Class="_170427_t0710_tooltip.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:_170427_t0710_tooltip"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Button Content="Button" Height="50">
<Button.ToolTip>
<StackPanel>
<TextBlock Text="Are you sure?"/>
<TextBlock Text="If you press this button,"/>
<TextBlock Text="you'll lose everything what you've got by now."/>
<TextBlock Text="I'm telling you. Stop it."/>
<TextBlock Text="This is not an advice, but an order"/>
<TextBlock Text="as a friend"/>
</StackPanel>
</Button.ToolTip>
</Button>
</Grid>
</Window>
検索用キーワード
- Hint