Mega Code Archive

 
Categories / C# / WPF
 

ToolTip with List items

<Window x:Class="WpfApplication1.Window1"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     Title="WPF" Height="150" Width="300">     <StackPanel Name="stackPanel1">         <Button Content="Button with a Richer ToolTip" Height="23"                  Margin="10" Name="button2" Width="175">             <Button.ToolTip>                 <StackPanel Name="stackPanel2" Width="200">                     <Label Name="label1" HorizontalAlignment="Left">                         List of Things:                     </Label>                     <ListBox Name="listBox1" Margin="10" >                         <ListBoxItem>Thing 1</ListBoxItem>                         <ListBoxItem>Thing 2</ListBoxItem>                         <ListBoxItem>Thing 3</ListBoxItem>                     </ListBox>                 </StackPanel>             </Button.ToolTip>         </Button>     </StackPanel> </Window>