哪种WPF控件最适合此菜单方案? [英] Which wpf control is best suited for this menu scenario?

查看:53
本文介绍了哪种WPF控件最适合此菜单方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个按钮样式的菜单,即水平排列的一组始终可见的按钮.
像单选按钮一样,它们应具有 selected 属性,即只有在 selected 状态更改为true时,才应触发click命令,而不是像普通按钮那样在每次单击时都触发. /p>

I need a button-style menu, i.e. horizontally arranged group of always visible buttons.
Like radiobuttons they should have a selected property, i.e. the click-command should fire only when the selected status changes to true, not on every click as with a normal button.

推荐答案

事实证明,一个具有水平布局的ListBox 在WrapPanel中非常适合我的情况. 我在另一个问题中发布了解决方案.

It turned out that a ListBox with a horizontal layout in a WrapPanel suits my scenario perfectly. I posted the solution in another question.

这篇关于哪种WPF控件最适合此菜单方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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