工具栏中的组合框表现不同
从这个线程开始一个新问题,任何人都可以回答为什么< code>ComboBox 和 CheckBox
es 在工具栏内部和外部的行为会有所不同吗?
链接问题的摘要:
我注意到当组合框放置在工具栏中时,行为存在差异。当不在工具栏中时,它的行为符合预期:复选框更改状态而不关闭弹出窗口。但在工具栏中,无论单击位置如何,第一次单击时弹出窗口都会关闭。请尝试新的代码。我真的需要在工具栏中使用它。
Starting a new question from this thread, Can anyone answer why a ComboBox
with CheckBox
es would behave differently inside and outside of a toolbar?
Summary from linked question:
I noticed that there is a difference of behavior when the ComboBox is placed in a Toolbar. When not in the Toolbar, it behaves as expected: the CheckBox changes state without closing the Popup. But in the ToolBar, the Popup closes on the first click, regardless of where the click is. Try the new code, please. I really need this in a toolbar.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我要感谢 jberger 建议我去 MS。
正如 MS 建议的,解决方案是在模板中将
CheckBox.Focusable
属性设置为False
。当
ComboBox
位于ToolBar
中或仅浮动在某些Panel
中时,这提供了所需的行为。I'd like to thank jberger for suggesting I go to MS.
As suggested by MS, the solution is to set the
CheckBox.Focusable
property toFalse
in the template.This provides the desired behavior when the
ComboBox
is either in aToolBar
or just floating in somePanel
.