美文网首页
【WPF】给控件添加tips提示

【WPF】给控件添加tips提示

作者: UnicornChen | 来源:发表于2019-05-22 20:08 被阅读0次

效果图:

<StackPanel>

        <CheckBox>

            问题:什么情况下母猪会上树?

            <CheckBox.ToolTip>

                <StackPanel>

                    <Label FontWeight="Bold" Background="Blue" Foreground="White">答题方法</Label>

                    <TextBlock Padding="10" TextWrapping="WrapWithOverflow" Width="200">

                点开下拉箭头,选择答案后再点击“问题:”前方的方框,即可提交!

                    </TextBlock>

                    <Line Stroke="Black" StrokeThickness="1" X1="200"></Line>

                    <StackPanel Orientation="Horizontal">

                        <Image Source="1.jpg" Margin="2" Width="32" Height="32"/>

                        <Label FontWeight="Bold">Press F1 for more help.</Label>

                    </StackPanel>

                </StackPanel>

            </CheckBox.ToolTip>

        </CheckBox>

        <Expander Header="Check the Answer" ExpandDirection="Down">

            <StackPanel>

                <RadioButton>A.母猪变成猴子!</RadioButton>

                <RadioButton>B.世界本末倒置!</RadioButton>

                <RadioButton>C.树倒猢狲散!</RadioButton>

                <RadioButton>D.女人不爱钱了!</RadioButton>

            </StackPanel>

        </Expander>

    </StackPanel>

相关文章

网友评论

      本文标题:【WPF】给控件添加tips提示

      本文链接:https://www.haomeiwen.com/subject/jkrpzqtx.html