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

Is RadDock my solution here?

4 Answers 117 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 23 Apr 2013, 06:25 PM
The attached picture shows a UI that I have been copying.  In my version of this UI there is a FlowLayoutPanel with my user controls on it.  On the right (what I want to build now) is what I think is a ToolWindow.   This ToolWindow cannot be moved; it's docked on the right.  That's where it stays.  It can be pinned or unpinned; nothing else.  It expands out over the FlowLayoutPanel.

I think RadDock is what I should use and, if so, I'm just a couple details away from making what I want.  If there's a better choice I'd like to hear (read) it.  But, if not:

1. How do I make a ToolWindow stay docked and not allow the user to move it anywhere?

    I found the forum response for the buttons so that there is only the pin:

 

  toolWindow1.ToolCaptionButtons =

 

ToolStripCaptionButtons.AutoHide;

2. How do I make that "Pin" button start out not pinned?  I want the ToolWindow to be collapsed.


3. How do I get a content area in the RadDock that doesn't have tabs or anything?  Basically, I want a rectangular shape that contains my user controls (in a scrolling container) and the ToolWindow...no tabs, no titles, nothing else.

Thank you,
Gary

 

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 Apr 2013, 12:35 PM
Hello Gary,

Thank you for writing.

Since you need the auto hide functionality, you should use the RadDock control to achieve it. 

1. You can do that by setting the AllowedDockState to the desired settings.

2. To set the state of a window you should use the DockState property of the control.

3. The ToolWindow has a Control collection that you can populate as per your requirement. Feel free to use it as you see it fit.

Here is a sample demonstrating this:
ToolWindow tw = new ToolWindow();
radDock1.DockWindow(tw, DockPosition.Right);
tw.Text = "some text";
tw.ToolCaptionButtons = ToolStripCaptionButtons.AutoHide;
tw.AllowedDockState = AllowedDockState.AutoHide | AllowedDockState.Docked;
tw.DockState = DockState.AutoHide;

I hope this helps.
 

Greetings,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
0
Doug
Top achievements
Rank 1
answered on 26 Apr 2013, 05:34 PM
Thank you, Stefan.

I'd like to return to my question 3.  I'm not asking about the ToolWindow here.

If I set up a RadDock and add my one ToolWindow (that I'm not asking about) then I have the rest of the client area with nothing in it.  That's the section where I want to put a FlowLayoutPanel and add my user controls.  What do I do?  I don't want anything that has tabs in this part.

What I think I've figured out is that I need to add a document window.  How do I remove the tab and text and the buttons from a document window so that I'm left with a plain rectangle?
0
Stefan
Telerik team
answered on 01 May 2013, 03:11 PM
Hello Gary,

Thank you for writing back and for the clarification.

The area you mention cannot be used without a window in it and you are right that placing a DocumentWindow is the right way to go. To hide its tab item, just use the following setting:
documentWindow1.TabStripItem.Visibility = ElementVisibility.Collapsed;

Let me know how this works for you.
 
Greetings,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
0
Doug
Top achievements
Rank 1
answered on 01 May 2013, 08:22 PM
Stefan,

Outstanding!  That does exactly what I want it to do.

Thank you,
Gary
Tags
Dock
Asked by
Doug
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Doug
Top achievements
Rank 1
Share this question
or