Is RadDock my solution here?

5 posts, 0 answers
  1. Doug
    Doug avatar
    50 posts
    Member since:
    Jul 2012

    Posted 23 Apr 2013 Link to this post

    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

     

  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 26 Apr 2013 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Doug
    Doug avatar
    50 posts
    Member since:
    Jul 2012

    Posted 26 Apr 2013 Link to this post

    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?
  5. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 01 May 2013 Link to this post

    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.
  6. Doug
    Doug avatar
    50 posts
    Member since:
    Jul 2012

    Posted 01 May 2013 Link to this post

    Stefan,

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

    Thank you,
    Gary
Back to Top
UI for WinForms is Visual Studio 2017 Ready