对内部项绑定进行 XAML 边框高度更改
我知道我可以为我的项目组创建两个不同的边框,并使用我的可见性转换器根据需要隐藏/取消隐藏,但希望我可以做得更干净一点...
我有一组项目(主要是标签和进度)栏)并根据我的工作人员是否正在进行中,我隐藏/取消隐藏需要显示的内容。
问题似乎是我在整组项目周围有一个边框(进行中时会显示更多项目),并且边框的高度设置为自动。但是,当我隐藏较大的一组项目时,我的边框不会调整大小。
有没有办法用单个边框获得所需的结果...或者我是否需要绑定另一个尺寸较小的边框?
(同样,这也允许我的网格调整大小,因为这是一个控件,因此同一页面上有多个实例)
I know that I can create two different borders for my item groups and use my visibility converter to hide/unhide as needed, but was hoping I can do this a little cleaner...
I have a group of items (mostly labels and a progress bar) and depending on if my worker is in progress or not, I hide/unhide what is needed to display.
The problem seems to be that I have a border around the entire set of items (more items are shown when in progress) and the height set to auto for the border. However when I hide the larger group of items my border does not resize.
Is there a way to get this desired result with a single border... or do I need to just bind another border that is smaller in size?
(Also along the same lines would this also allow my grid to resize since this is a control so there a multiple instances on the same page)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来你正在做 Visibility.Hidden 。尝试可见性。折叠
Sounds like you are doing Visibility.Hidden. Try Visibility.Collapsed