如何将DevExpress扩展组件(RibbonPageGroup)放在WinForms的工具箱上

发布于 2024-10-05 13:14:31 字数 251 浏览 0 评论 0原文

我扩展了一个 DevExpress 组件(不是控件),即 RibbonPageGroup,以便在我的应用程序中使用。我喜欢在 VS2010 设计器的工具箱中看到它,但在这里“它不会出现”。我认为这与扩展组件的继承层次结构有关。它并非源自控制。

我是否通过扩展本身扩展 Component 的 Type 走错了路?或者我可以让它出现在工具箱上并将其拖放到 RibbonControls 上。

任何答案将不胜感激。蒂亚、乔普。

I have extended a DevExpress component (not a control), a RibbonPageGroup, to be used around my application. I like to see it in the toolbox in the VS2010 designer but "it won't appear" here. I assume it has to do with the inheritance hierarchy of the extended component. It doesn't derive from control.

Am I going the wrong way by extending a Type that itself extends Component. Or can I make it possible to appear on the toolbox and drag and drop it on RibbonControls.

Any answer would be appreciated. Tia, Joep.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情释 2024-10-12 13:14:31

DevExpress 的回答:


[ToolboxItem(true), DesignTimeVisible(true)] public class MyRibbonPageGroup : RibbonPageGroup {...

但是,我应该提到这不是一个可视组件,因此当放置到表单上时,它将与所有其他非可视组件一起出现在屏幕底部。


令我惊讶的是它不是一个视觉组件。当我通过 RibbonPage“加速器”弹出菜单添加页面组时,会出现一个新的页面组。我的目的是创建一个带有打印和打印预览按钮的自定义页面组,以及公共布局控件(在设计器中可用/可设置)。因为我在创建的许多表单上使用打印(预览)的这种组合,所以我认为将此功能封装到自定义“控件”中是个好主意......我可以轻松地将其放在任何地方的 RibbonPages 上......

而且它是true 表示该组件出现在页面底部。我想将它“粘在”某个页面组设计时。

Answer from DevExpress:


[ToolboxItem(true), DesignTimeVisible(true)] public class MyRibbonPageGroup : RibbonPageGroup {...

However, I should mention that this is not a visual component, so when being placed onto a form, it will appear at the bottom of the screen with all other non-visual components.


It surprises me that it's not a visual component. When I add a pagegroup via the RibbonPage "accelerator" pop-menu a new pagegroup appears. My intention was to create a custom pagegroup with a print and printpreview button with a public LayoutControl (which would be available / settable in the designer). Because I use this combination of print(preview) on many forms I create I thought it would be a good idea to encapsulate this functionality into a custom "control"...which I could easily drop on RibbonPages everywhere....

And it's true that the component appears at the bottom of the page. I would like to "cling" it onto a certain pagegroup design-time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文