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

Changing dock state programatically

7 Answers 295 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 18 Jun 2008, 02:51 PM
Regarding dock panel:

Is it possible to toggle between docked and autohide programmatically?  Also how do I change the width and height of a panel that is floating or hiding?

One of the major problem I have with auto hide is I cannot adjust the height when it is hiding.  So when user hover on the docking bar, he can only see a portion of it instead of the whole panel.

Regarding dockpane on a tabbed document:

I checked the "CloseButtonVisible" to false, but that button is still present and nothing to stop the user clicking on it.

Sometimes when the user click or hold on two tabs too quickly, it will swap the tab position instead of focusing on the new tab.  Is there anyway to prevent this to happen?

7 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 23 Jun 2008, 08:44 AM
Hi Edward ,

Thank you for the questions.

Please find their respective answers below:

  1. It is possible to programmatically toggle between docked and autohide programmatically. Setting the size for the floating dock panel is possible as well. I have demonstrated the approaches in the sample project attached. Currently, you cannot set the size for dock panel when it is in the AutoHide state.
  2. Concerning the close button, instead of CloseButtonVisible, you should set:
    this.dockingManager1.TdiCloseButtonVisible = false
  3. When you click these tabs too quickly, you might have performed a drag operation inadvertently. As a result, tabs switch their places. In the sample project I have also demonstrated how to avoid this behavior. However, at this time, this is only possible for document tabs, and not for dock tabs.
If you have additional questions, feel free to contact me.

Regards,
Nikolay
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Gabor
Top achievements
Rank 1
answered on 29 Jun 2008, 12:34 PM
Hi Telerik,

I was wondering if there's a way to hide an autohide panel from code.
I've got an autohide panel with some spineditors and buttons on it. If user clicks a button, I have to do stuff and then make the panel go away (but not forever). The last part is more tricky than I first thought. I tried the hide() function, but it just made the panel disappear. Not something the user would like to see. I also tried to give focus to other controls on the form. Didn't work out either.
The only way I could make the panel disappear was to change it's dockstate to docked, and then back to autohide. But that looks quite ugly, and my boss just can't live with that.

I'd appreciate your help. Thanks :)

Gabor
0
Gabor
Top achievements
Rank 1
answered on 30 Jun 2008, 08:14 AM
Sorry for that, I found the right method, just not where I expected it.
If anyone else is interested, you have to call the two-argument overload of the dockingmanager's hide method:

myDockingManager.Hide(myAutoHidePanel, true);
0
Nikolay
Telerik team
answered on 02 Jul 2008, 08:47 AM
Hello Gabor,

I am glad to hear that your issue has been solved.

If you have additional questions, contact me.

Regards,
Nikolay
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
work
Top achievements
Rank 1
answered on 21 Sep 2015, 01:08 PM

Hi,Nikolay.

I have one question about the docked event.

I am developing ​video recording app  now.

when user make the phone docked,  camera is died and recording state is changed, because   current activity is recreated (onResume).

I am going to prevent calling of  the resume function by making  the state docked before docking.

Is it possible?

thanks for your help.

 

0
work
Top achievements
Rank 1
answered on 21 Sep 2015, 01:11 PM

Hi, Nikolay.

 The app that I am developing  is android app.

please help me.

thanks.

 

0
Stefan
Telerik team
answered on 21 Sep 2015, 01:56 PM
Hi,

Please note that this forum concerns Telerik UI for WinForms. Questions related to UI for Android can be addressed in the respective forum: http://www.telerik.com/forums/android.

Regards,
Stefan
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
Dock
Asked by
Edward
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Gabor
Top achievements
Rank 1
work
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or