Disabling/Overwriting Context Menu at Floating Dock Panel

3 posts, 0 answers
  1. Haroon
    Haroon avatar
    38 posts
    Member since:
    Dec 2007

    Posted 21 Jan 2008 Link to this post

    Hi,

    I Hope all Telerik team member would be fine.

    I am working with Docking Manager and faced an issue that on floating docking Panel I am unable to disable context Menu on the Caption. Then I found a thread regarding this issue i.e. http://www.telerik.com/community/forums/thread/b311D-htaac.aspx, and now I hope as Q3 is release there would be some how that I want change it  and can hide it. Please do guide in this matter.

     P.S. It cause major problems for me if the use 'Hides' or change it into 'Tab Document' specailly.

    Regards,

    Haroon.

  2. kdev
    kdev avatar
    16 posts
    Member since:
    Apr 2007

    Posted 22 Jan 2008 Link to this post

    Hi,

    I also have the same problem as Haroon,
    To overwrite the DockPanel menu, Telerik proposed me to do like that 
    (this.dockingManager1.PrimarySite as DockSite).PostLayout += new EventHandler(Form1_PostLayout);  
     
     void Form1_PostLayout(object sender, EventArgs e)  
            {  
                 DockPanel panel = (sender as Telerik.WinControls.Docking.DockSite).Active as DockPanel;  
                 
                 if (panel != null)  
                 {  
                     ChangeDropDownMenu(panel);  
                 }  
                 
            }  
     
          public void ChangeDropDownMenu(DockPanel dockPanel)  
         {  
             if (dockPanel.DefaultPresenter != null && dockPanel.DefaultPresenter is DockPresenterControl)  
             {  
                 RadItem dockPresenterElement = ((DockPresenterControl)dockPanel.DefaultPresenter).DockPresenterElement;  
                 ClassSelector selector = new ClassSelector("DockPresenterCaptionDropDown");  
                 RadDropDownButtonElement dropDownButton = selector.GetSelectedElements(dockPresenterElement)[0] as RadDropDownButtonElement;  
                 this.AddMenuItems(dropDownButton, dockPanel);  
             }  
         }  
     

    But as Haroon notice, this don't work for a floating or an Autohide Panel  :S 

    please Telerik team, can you propose as an alternative solution
    thanks you for your great work
    kort
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 23 Jan 2008 Link to this post

    Hi Haroon,

    Sorry for the inconvenience, but we haven't found an appropriate workaround for this scenario yet.

    In current release of the Docking component there is no public API for accessing the AutoHide presenter and override mechanism for right click. The new API will be provided for Q3 SP1 release planned for second week of February.

    If you have additional questions, please contact us.

    All the best,
    Julian Benkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top