This is a migrated thread and some comments may be shown as answers.

autohide toolwindow pin icon placement and open size

1 Answer 194 Views
Dock
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 09 Oct 2012, 09:37 PM
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. 

Thanks!

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 15 Oct 2012, 08:58 AM
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)
    {
        return;
    }
    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,
Nikolay
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.
Tags
Dock
Asked by
John
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or