Ticket Q458946
Visible to All Users

Set dockPanel size

created 12 years ago

Hi,

we have a dockpanel that is docked at the right side in autoHide mode.
When a user hovers over the label at the side the panel slides open.
I want the panel to go over half of the application.
Whatever I try (setting size) the panel width always stay to the size that i set in design mode.
A user can drag drop the panel larger but I want to do that from code.
(and also change size again when application size changes)
How can I do that?

Jeroen

Answers approved by DevExpress Support

created 12 years ago (modified 12 years ago)

Hi,
Thank you for your message.
To change the panel width, set the DockPanel.Visibility property to Visible. Then, assign a new width. Finally, reset the panel state.

C#
private void SetDockPanelWidth(int width) { DevExpress.XtraBars.Docking.DockVisibility visibility = dockPanel1.Visibility; dockPanel1.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; dockPanel1.Width = width; dockPanel1.Visibility = visibility; }
Visual Basic
Private Sub SetDockPanelWidth(ByVal width As Integer) Dim visibility As DevExpress.XtraBars.Docking.DockVisibility = dockPanel1.Visibility dockPanel1.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible dockPanel1.Width = width dockPanel1.Visibility = visibility End Sub

Please try this solution and inform us of your results.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.