Ticket Q97588
Visible to All Users

NewAction container without template modification

created 17 years ago

Hi,
I want to create an XAF windows module that would extend the existing UI by creating it's own toolbar and a series of action containers in that toolbar.
I know how to add a new toolbar and action containers by creating a template form; however, is it possible to do this via a module without having to create a form template?
Thanks,
Mark

Comments (3)
Dennis Garavsky (DevExpress) 17 years ago

    Hi Mark,
    Yes, it is possible. You can write a new controller like this:

    C#
    public partial class ViewController1 : ViewController { protected override void OnFrameAssigned() { base.OnFrameAssigned(); Frame.TemplateChanged += new EventHandler(Frame_TemplateChanged); } void Frame_TemplateChanged(object sender, EventArgs e) { //... //List<IActionContainer> containers = access the list of action containers here (using the ReflectionHelper or somehow else); // and then add your own containers to it }

    The main goal is to access the template and add the required action containers to its containers collection. Please let me know if you experience any problems with this approach.
    Thanks
    Dennis

    MK MK
    Mark Krasnohorsky 17 years ago

      Hi Dennis,
      Thats great. Thanks,
      Mark

      Dennis Garavsky (DevExpress) 17 years ago

        Welcome!

        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.