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

Document Window

3 Answers 111 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Ammar
Top achievements
Rank 1
Ammar asked on 14 May 2015, 08:38 AM
i want to make ribbon bar button for show\hide a Document Window in the same position of  RadDoke any one can help me ??

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 15 May 2015, 11:53 AM
Hello Ammar,

Thank you for writing.

You can use the DockState property to determine if the window is visible and show or hide it:
ToolWindow wnd;
public RadForm1()
{
    InitializeComponent();
    wnd = new ToolWindow();
    wnd.CloseAction = DockWindowCloseAction.Hide;
 
    radDock1.DockWindow(wnd, DockPosition.Right);
 
}
 
private void radButton1_Click(object sender, EventArgs e)
{
    if (wnd.DockState != DockState.Hidden)
    {
        wnd.Hide();
    }
    else
    {
        wnd.Show();
    }
}

Please let me know if there is something else I can help you with. 
 
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ammar
Top achievements
Rank 1
answered on 17 May 2015, 07:34 AM

Ok bro its fine but i need to control the position of DocumentTabStrip inside DocumentContainer 

Note: DocumentContainer  inside RadSplitContainer and RadSplitContainer inside RadDock.

0
Dimitar
Telerik team
answered on 18 May 2015, 03:24 PM
Hello Ammar,

Thank you for writing back.

To control the tabs position you can change the document insert order, or you can re-dock a specific window with the DockWindow method:
private void radButton1_Click(object sender, EventArgs e)
{
    if (wnd.DockState != DockState.Hidden)
    {
        wnd.Hide();
    }
    else
    {
        wnd.Show();
        radDock1.DockWindow(wnd, DockPosition.Fill);
    }
}

You can also have a look at our Redock service if it would do you any good: http://www.telerik.com/help/winforms/dock-architecture-and-features-using-the-redockservice.html 

Let me know if you have additional questions.
 
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
RibbonBar
Asked by
Ammar
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Ammar
Top achievements
Rank 1
Share this question
or