提示 ToolTip

 <StackPanel>
        <Button Content="按钮1" ToolTip="这是个按钮1" HorizontalAlignment="Center" Margin="0,10,0,0"/>
        <Button Content="按钮2"  HorizontalAlignment="Center" Margin="0,10,0,0">
            <Button.ToolTip>
                <ToolTip Background="Yellow">
                    <StackPanel>
                        <TextBlock Text="这是个按钮2"/>
                        <Image Source="C:/Users/Jv/Desktop/lena512.tiff" Width="50" Height="50"/>
                    </StackPanel>
                </ToolTip>
            </Button.ToolTip>
        </Button>
    </StackPanel>

猜你喜欢

转载自www.cnblogs.com/xixixing/p/11031217.html