Permalink
Cannot retrieve contributors at this time
Fetching contributors…
| <StackPanel | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| x:Class="ToolTipSimple_wcp.Pane1" | |
| > | |
| <StackPanel.Resources> | |
| <!--<SnippetStyle>--> | |
| <Style TargetType="ToolTip"> | |
| <Setter Property = "HorizontalOffset" Value="10"/> | |
| <Setter Property = "VerticalOffset" Value="10"/> | |
| <Setter Property = "Background" Value="LightBlue"/> | |
| <Setter Property = "Foreground" Value="Purple"/> | |
| <Setter Property = "FontSize" Value="14"/> | |
| <Setter Property = "FontWeight" Value="Bold"/> | |
| </Style> | |
| <!--</SnippetStyle>--> | |
| </StackPanel.Resources> | |
| <Grid ShowGridLines ="false" Background ="White" > | |
| <Grid.ColumnDefinitions> | |
| <ColumnDefinition Width="300"/> | |
| <ColumnDefinition Width="250"/> | |
| </Grid.ColumnDefinitions> | |
| <Grid.RowDefinitions> | |
| <RowDefinition/> | |
| <RowDefinition/> | |
| <RowDefinition/> | |
| <RowDefinition/> | |
| <RowDefinition/> | |
| <RowDefinition/> | |
| <RowDefinition/> | |
| </Grid.RowDefinitions> | |
| <TextBlock Margin="10, 10, 3, 3" Grid.Column="0" Grid.Row="0" FontSize="24"> | |
| ToolTips | |
| </TextBlock> | |
| <TextBlock Margin="10, 10, 3, 3" Grid.Column="0" Grid.Row="1" FontSize="14" | |
| Grid.ColumnSpan="2"> | |
| The following tooltip examples demonstrate: | |
| </TextBlock> | |
| <DockPanel Margin="10, 10, 3, 3" Grid.Column="0" Grid.Row="2"> | |
| <!--<Snippet1>--> | |
| <TextBox HorizontalAlignment="Left">TextBox with ToolTip | |
| <TextBox.ToolTip> | |
| <TextBlock>Useful information goes here.</TextBlock> | |
| </TextBox.ToolTip> | |
| </TextBox> | |
| <!--</Snippet1>--> | |
| </DockPanel> | |
| <TextBlock Margin="10, 10, 3, 3" Grid.Column="1" Grid.Row="2" FontSize="12" | |
| VerticalAlignment="Center">Tooltip attached to a text box control.</TextBlock> | |
| <DockPanel Margin="10, 10, 3, 3" Grid.Column="0" Grid.Row="3"> | |
| <!--<SnippetToolTip>--> | |
| <TextBox HorizontalAlignment="Left">ToolTip with non-text content | |
| <TextBox.ToolTip> | |
| <ToolTip> | |
| <DockPanel Width="50" Height="70"> | |
| <Image Source="data\flower.jpg"/> | |
| <TextBlock>Useful information goes here.</TextBlock> | |
| </DockPanel> | |
| </ToolTip> | |
| </TextBox.ToolTip> | |
| </TextBox> | |
| <!--</SnippetToolTip>--> | |
| </DockPanel> | |
| <TextBlock Margin="10, 10, 3, 3" Grid.Column="1" Grid.Row="3" FontSize="12" | |
| VerticalAlignment="Center" TextWrapping="WrapWithOverflow"> | |
| Tooltip with non-text content. The content is a dock panel | |
| which contains an image. | |
| </TextBlock> | |
| <DockPanel Margin="10, 10, 3, 3" Grid.Column="0" Grid.Row="4"> | |
| <!--<Snippet3>--> | |
| <TextBox HorizontalAlignment="Left" ToolTipService.InitialShowDelay="1500" | |
| ToolTip="Useful information goes here."> | |
| ToolTip with delay | |
| </TextBox> | |
| <!--</Snippet3>--> | |
| </DockPanel> | |
| <TextBlock Margin="10, 10, 3, 3" Grid.Column="1" Grid.Row="4" FontSize="12" | |
| VerticalAlignment="Center" TextWrapping="WrapWithOverflow"> | |
| Tooltip that uses the ToolTipService to delay showing the tooltip. | |
| </TextBlock> | |
| <DockPanel Grid.Column="0" Grid.Row="5" Width="100" | |
| HorizontalAlignment="Left" Margin="10, 10, 3, 3"> | |
| <!--<SnippetShowOnDisabled>--> | |
| <Button IsEnabled="false" ToolTipService.ShowOnDisabled="True" | |
| Content="Disabled Button"> | |
| <Button.ToolTip> | |
| <ToolTip> | |
| <TextBlock> | |
| ToolTipService.ShowOnDisabled = True | |
| </TextBlock> | |
| </ToolTip> | |
| </Button.ToolTip> | |
| </Button> | |
| <!--</SnippetShowOnDisabled>--> | |
| </DockPanel> | |
| <TextBlock Margin="10, 10, 3, 3" Grid.Column="2" Grid.Row="5" FontSize="12" | |
| VerticalAlignment="Center" TextWrapping="WrapWithOverflow"> | |
| Tooltip that appears for a disabled element. | |
| </TextBlock> | |
| <Button Name="btn" Margin="10, 10, 3, 3" Grid.Column="0" Grid.Row="6" | |
| Click="OnClick"> | |
| Click me to create a tooltip by using code. | |
| </Button> | |
| <TextBlock Margin="10, 10, 3, 3" Grid.Column="1" Grid.Row="6" FontSize="12" | |
| VerticalAlignment="Center" TextWrapping="WrapWithOverflow"> | |
| Creating a tooltip by using code. | |
| </TextBlock> | |
| </Grid> | |
| <Canvas Name="cv2" Width="550" Height="50" Canvas.Top="290" Canvas.Left="10"/> | |
| </StackPanel> |