简体   繁体   English

带下拉菜单的SilverLight / WPF按钮

[英]SilverLight / WPF Button with DropDown

Is it possible to create a button with a drop down, or a combobox that has the dropdown arrow along the bottom as opposed to the right hand side? 是否可以创建一个带有下拉菜单的按钮,或者创建一个下拉菜单箭头位于底部而不是右侧的组合框? I am trying to emulate the "Paste" button in the Word 2010 ribbon. 我试图模仿Word 2010功能区中的“粘贴”按钮。

Here is a small sample that you get the right idea how to accomplish that. 这是一个小样本,您可以正确了解如何实现此目的。 But it's not the word like button: 但这不是按钮之类的词:

http://www.tanguay.info/web/index.php?pg=codeExamples&id=140 http://www.tanguay.info/web/index.php?pg=codeExamples&id=140

I've used it with success, but only on the right-side. 我已经成功地使用了它,但是只在右边使用。

http://blogs.msdn.com/b/delay/archive/2010/06/11/splitbuttoning-hairs-two-fixes-for-my-silverlight-splitbutton-menubutton-implementation-and-true-wpf-support.aspx http://blogs.msdn.com/b/delay/archive/2010/06/11/splitbuttoning-hairs-two-fixes-for-my-silverlight-splitbutton-menubutton-implementation-and-true-wpf-support。 aspx

However it is customizable to the point where you may manipulate the _contextMenu.HorziontalOffset and _contextMenu.VerticalOffset to your liking. 但是,它是可定制的,您可以根据自己的喜好来操作_contextMenu.HorziontalOffset和_contextMenu.VerticalOffset。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM