Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Menu, Application Menu, Context Menu > how to prevent merging the ParentMDI menu with ChildMDI menu ???

Not answered how to prevent merging the ParentMDI menu with ChildMDI menu ???

Feed from this thread
  • Asa'ad avatar

    Posted on Jun 1, 2011 (permalink)

    i'm using MDI from with RadMenu, if i maximize the child from, it's RadMenu will merge with MDI RadMenu.
    How to prevent that ?

    Reply

  • Ivan Todorov Ivan Todorov admin's avatar

    Posted on Jun 6, 2011 (permalink)

    Hi Asa'ad,

    Thank you for your question.

    This should be done by setting the AllowMerge property to false, but it seems that it currently does not work. This issue will be addressed in some of the next releases. I have added this to PITS so you can track its progress. Here you can find the PITS Issue: Public URL

    For the time being, you can prevent the menu merge by overriding the RadMenu class as it is shown in the following code snippet:
    public class NonMergeMenu : RadMenu
    {
        public bool CancelVisible = false;
     
        public override void MergeMenu(RadMenu sourceMenu)
        {
            NonMergeMenu src = sourceMenu as NonMergeMenu;
     
            base.MergeMenu(sourceMenu);
            base.UnmergeMenu(sourceMenu);
            sourceMenu.Visible = true;
     
            if (src != null)
            {
                src.CancelVisible = true;
            }
        }
     
        protected override void OnVisibleChanged(EventArgs e)
        {
            base.OnVisibleChanged(e);
            if (this.CancelVisible)
            {
                this.CancelVisible = false;
                this.Visible = true;
            }
        }
     
        public override string ThemeClassName
        {
            get
            {
                return typeof(RadMenu).FullName;
            }
            set
            {
                base.ThemeClassName = value;
            }
        }
    }

    Then you should replace all your RadMenu instances with NonMergeMenu ones.

    Your Telerik points have been updated for bringing this issue to our attention.

    I hope this helps. Feel free to ask if you have any further questions.

    Greetings,
    Ivan Todorov
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Menu, Application Menu, Context Menu > how to prevent merging the ParentMDI menu with ChildMDI menu ???
Related resources for "how to prevent merging the ParentMDI menu with ChildMDI menu ???"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]