WPF 手风琴垂直对齐错误 [英] WPF Accordion VerticalAlignment bug

查看:22
本文介绍了WPF 手风琴垂直对齐错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


使用最新的 WPF 工具包中的 Accordion 控件时,我遇到了这个问题.当手风琴控件的 VerticalAlignment 设置为Stretch"时,如果 SelectionMode 设置为One",则其中包含的 AccordionItems 将不再展开.如果选择模式设置为ZeroOrOne",您会在多次尝试点击后得到扩展.如果将其设置为ZeroOrMore",则会发生一些非常奇怪的事情,其中​​手风琴项目会从屏幕底部丢失!


Using the Accordion control from the latest WPF toolkit i came across this issue. When an accordion control has its VerticalAlignment set to 'Stretch' the AccordionItems contained within it will no longer expand if the SelectionMode is set to 'One'. If the selection mode is set to 'ZeroOrOne' you get expansion after several attempts at clicking. If it is set to 'ZeroOrMore' some really funky stuff happens where accordion items go missing off the bottom of the screen!

有人找到了解决这个问题的方法吗?

Anyone found a solution for this problem?

谢谢!

推荐答案

一个好的解决方法是将 ActualHeightActualWidth 绑定到你希望它填充的父元素.这是一个小技巧,但它会起作用.

An OK workaround is to bind the ActualHeight and ActualWidth to the parent element you want it to fill. This is a bit of a hack but it will work.

这篇关于WPF 手风琴垂直对齐错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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