0
点赞
收藏
分享

微信扫一扫

hadoop的相关操作

zhyuzh3d 2024-05-06 阅读 35

ToolTip控件在WPF担任着提示信息的位置,当鼠标悬停在某个标签上时ToolTip中的信息会显示,使用时将ToolTip放在某个标签内部或者设置某个标签的ToolTip属性。

使用方法1

<TextBox Width="300"
         Height="40"
         HorizontalAlignment="Left"
         VerticalAlignment="Top">
    当鼠标移入输入框显示提示信息
    <TextBox.ToolTip>
        23
    </TextBox.ToolTip>
</TextBox>

使用方法2(多个提示信息)

<!--当有多个提示语-->
<Button Width="100" Height="40" Margin="200,0,0,0">
    点击
    <Button.ToolTip>
        <StackPanel>
            <TextBlock>天王盖地虎</TextBlock>
            <TextBlock>宝塔镇河妖</TextBlock>
        </StackPanel>
    </Button.ToolTip>
</Button>

使用方法3(设置属性)

 <Label Content="12122" ToolTip="000000"></Label>

举报

相关推荐

0 条评论