autohide toolwindow pin icon placement and open size

2 posts, 1 answers
  1. John
    John avatar
    60 posts
    Member since:
    Nov 2006

    Posted 09 Oct 2012 Link to this post

    Hi, i have 3 questions about the autohide tool windows.  

    1 i have a tool window docked right.  the pin is on the right.  how can i put the pin on the left when open?
    2 how can i stop the tool window from opening on mouse hover.  users only want it to open when clicked
    3. how can i fill the available space.  it's stopping next to the end of the container and you can see what's under it.  i want it to slide all the way out to the edge of the control it's on.

    see attachments that will make 1 and 3 clearer. 

  2. Answer
    Nikolay avatar
    1805 posts

    Posted 15 Oct 2012 Link to this post

    Hello John,

    Thank you for contacting us.

    Here are the answers to your questions:
    1. In order to set the position of the pin button, you need to change the way it is docked in the caption area. Here is a sample code snippet which loops though all ToolWindows and sets the position of the pin button to left:

    for (int i = 0; i < this.radDock1.DockWindows.ToolWindows.Length; i++)
        this.radDock1.DockWindows.ToolWindows[i].ToolCaptionButtons = Telerik.WinControls.UI.Docking.ToolStripCaptionButtons.AutoHide;
        ToolTabStrip strip = (ToolTabStrip)this.radDock1.DockWindows.ToolWindows[i].TabStrip;
        RadToggleButtonElement pinButton = (RadToggleButtonElement)strip.CaptionElement.Children[2].Children[1];
        DockLayoutPanel.SetDock(pinButton, Telerik.WinControls.Layouts.Dock.Left);
    2. You can open AutoHide window only on click by handling the AutoHideWindowDisplaying event and checking what is the reason for which the window is going to be shown. If it is TabItemClicked, then we can allow the operation:
    void radDock1_AutoHideWindowDisplaying(object sender, AutoHideWindowDisplayingEventArgs e)
        if (e.DisplayReason == AutoHideDisplayReason.TabItemClicked)
        e.Cancel = true;
    3. Currently, there is an issue with the size of the AutoHide windows and although it is set by the AutoHideSize property, the AutoHide window still can't cover the entire RadDock area. It is logged in our Public Issue Tracker, but I cannot provide you with a workaround for the time being. Kind regards,
    the Telerik team
    You’ve been asking for it and now it’s time for us to deliver. RadControls for WinForms Q3 2012 release is just around the corner. Sign up for a free webinar to see first all the latest enhancements.
Back to Top