WPF中带字幕的边框 [英] Borders with captions in WPF

查看:275
本文介绍了WPF中带字幕的边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何在带字幕的WPF中获得边框,即网络浏览器显示< fieldset>的方式吗?标签?有没有简单的方法,例如设置属性,还是我必须制作一个ControlTemplate?

Does anybody know how to get a border in WPF with a caption, i.e. the way web browsers display <fieldset> tags ? Is there an easy way, like setting a property, or am I going to have to make a ControlTemplate ?

推荐答案

也许是 GroupBox ?

<GroupBox>
    <GroupBox.Header>
      <Label>Hello</Label>
    </GroupBox.Header>
    <TextBlock Text="World!" />
</GroupBox>

这篇关于WPF中带字幕的边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆