Hi,
In the latest version of XAF, there is no RibbonTemplates node in the model editor. How do I customize the ribbon now and add / remove pages and change action mapping without having to do it in code?
Steps to Reproduce:
Open Windows application model editor
Actual Results:
no RibbinTemplates node shown
Expected Results:
Need some way to customise the ribbon bar as was previously available
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Frank,
In the current version, the Ribbon interface is generated based on the window template (existing bars); it does not use the model. This behavior is by design.
To customize the ribbon, you should customize bars in the frame template. The ActionContainerBarItem and XafBar classes have properties to specify the target Ribbon page and category.
Please refer to the How to: Customize a Template help topic and example How to Customize a Template.
An alternative solution is to extend the application model with additional properties, and specify Ribbon properties in the model. Possibly, we'll implement this functionality in the next major version. Currently, you can use the attached controller to extend the IModelActionLink interface with TargetRibbonPage and TargetRibbonGroup properties. Using this controller you can specify the Ribbon page and group in the ModelEditor (Application->ActionDesign->ActionToContainerMapping->SomeActionContainer->SomeAction).
Thanks,
Michael.
Thanks. I think adding TargetRibbonPage & TargetRibbonGroup to the model would be a great suggestion for the next version so that we can easily specify where action items are to be created on the ribbon.
"Currently, you can use the attached controller to extend the IModelActionLink interface with TargetRibbonPage and TargetRibbonGroup properties. Using this controller you can specify the Ribbon page and group in the ModelEditor (Application->ActionDesign->ActionToContainerMapping->SomeActionContainer->SomeAction)"
How would I go about doing what you descibed above? I have no idea what you are referring to by the "attached" controller. Could you perhaps provide me with a VB example of the above please?
Thanks
Frank
Sorry, only saw the controller attachment now but it is in C# (which might as well be Greek or Russian) which I battle with. Please could you give me a VB version.
Thanks
Frank
Hi Frank,
I've attached a project in VB.NET. Note that in this sample I moved the Refresh action to the "Refresh" group if the "Refresh" page.
Thanks,
Michael.
Thanks. That works great for some actions BUT: how do I get the following items as ribbon pages / groups:
1 - security -> my details
2 - printing items
3 - about info
Only some items where I specify the ribbon page / group get added, others seems to be ignored / overwritten. Please provide a VB example to achieve the above.
Thanks
Frank
We're working on your issue and will answer you as soon as possible. We're sorry for the delay.
Hi Frank,
Action items in the main menu are processed in a different manner - they are moved to the Ribbon application menu. To be able to put them in a specific Ribbon page group, first copy the ActionLink to any ActionContainer that is visible in the Ribbon (e.g. "View").
Thanks,
Michael.
Thanks, the solution given is OK as a workaround but I believe this would be a great out-the-box feature in XAF. Will put in a suggestion for this to be added
This solution is also included in eXpandFramework versin 12.2.8.9 see also http://www.expandframework.com/forum/13-suggestions/3346-control-ribbon-page-category-and-ribbon-item-style-via-model-editor.html#3561