Changing dock state programatically

8 posts, 0 answers
  1. Edward
    Edward  avatar
    32 posts
    Member since:
    Jan 2008

    Posted 18 Jun 2008 Link to this post

    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?
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 23 Jun 2008 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Gabor
    Gabor avatar
    4 posts
    Member since:
    Jun 2008

    Posted 29 Jun 2008 Link to this post

    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
  5. Gabor
    Gabor avatar
    4 posts
    Member since:
    Jun 2008

    Posted 30 Jun 2008 Link to this post

    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);
  6. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 02 Jul 2008 Link to this post

    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
  7. work
    work avatar
    2 posts
    Member since:
    Sep 2015

    Posted 21 Sep 2015 Link to this post

    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.

     

  8. work
    work avatar
    2 posts
    Member since:
    Sep 2015

    Posted 21 Sep 2015 in reply to work Link to this post

    Hi, Nikolay.

     The app that I am developing  is android app.

    please help me.

    thanks.

     

  9. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 21 Sep 2015 Link to this post

    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
Back to Top
UI for WinForms is Visual Studio 2017 Ready