I am trying out Xaf and I don't like that the ribbon is generated from Classic view since some things look better in ribbon form than in the bar form (organization is different). I am trying to create runtime customization of the ribbon by using merge ribbon and unmerge. I'm creating A new node in the model that will house additional ribbon customizations that will be merged with the ribbon that was transformed via the RibbonFromModelController. There will be a property that allows for replacing the ribbon with the custom one or just differencing them. I want to know if this is feasible in Xaf: is there anything I need to be aware of. And do you have any samples that could point me in the direction to implementing this properly. I am trying to test out eventually trying runtime customization via the Customize context menu.
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.
Hello Nancy,
I apologize for the delay.
These days we've been a little bit overloaded with support queries.
We are working on your issue, and will answer you ASAP.
Thanks,
Anatol
Hello Nancy,
To control the process of transforming bars to a ribbon, you can access the ClassicToRibbonTransformer using the frame template's RibbonTransformer property, and use the following events:
public event EventHandler<ResolveBarItemTargetPageEventArgs> ResolveBarItemTargetPage; public event EventHandler<ResolveMainMenuItemTargetPageEventArgs> ResolveMainMenuItemTargetPage; public event EventHandler<CustomTransformBarLinkContainerEventArgs> CustomTransformBarLinkContainer; public event EventHandler<TransformingEventArgs> Transforming; public event EventHandler<EventArgs> Transformed; public event EventHandler<BarItemAddingEventArgs> BarItemAdding; public event EventHandler<BarItemAddedEventArgs> BarItemAdded;
In handlers of these events, you can check the required model properties and customize Ribbon according their values.
A similar task was discussed in the Complex ribbon thread. You can find a sample using these events in it.
We also have a related suggestion: Introduce runtime Ribbon customization
Thanks,
Anatol