This project is read-only.

DockableContent Width

Apr 18, 2011 at 3:43 PM


Hi Folks, 

Our team have been working with Avalon for a few months but there seem to be a few glitches that we can't seem to iron out.

We have a main screen that docks the DockingManager (dock). A WPF user control ("wucTilePropertiesPanel") is instantiated and displayed as dockable content depending on a button click from the user. However, this content opens up with the same width regardless of what I set the appropriate value (i.e. here 900). 

When I look at the width of windowContent it is NaN. 

            Dim oPanel As New wucTilePropertiesPanel
            Dim windowContent As New DockableContent()
            windowContent.Title = "Tile Properties Panel"
            windowContent.IsLocked = False
            windowContent.IsManipulationEnabled = True
            windowContent.Content = oPanel
            windowContent.Width = 900
            windowContent.Show(dock, AvalonDock.AnchorStyle.Right)
I think I am probably doing something really silly. Any ideas?

Thanks, 
David

 

 

May 7, 2011 at 12:07 AM

Hi David,

Are themes working correctly in your application? I was having the same problem and
noticed a few minor glitches with the dev2010 theme as the same time.

I finally solved the problem by getting other versions of the DLLs:

  1. AvalonDock.dll - version 1.3.3571, 316KB
  2. AvalonDock.Themes.dll - version 1.0.0.0, 64KB

 

Also, are you setting the resize width?

ad:ResizingPanel.ResizeWidth="270"

 

HTH,
Drew

Dec 23, 2011 at 8:34 AM

Hi barfield2256,

I'm using same version as you said.

when we write code in XAML, 

// ad:ResizingPanel.ResizeWidth="270" // this code works fine.

But in my case I load from UserControl into Dockmanager. In My issue I want to write in codebehind. How to write?

Code:

 

 private void Load_LeftPanel()
        {

            var leftpanel = new DockableContent();
            leftpanel.Title = "Tank Name";
            leftpanel.Name = "ListContent";
            leftpanel.Content = new LeftPanel(); //LeftPanel is My control.
            leftpanel.IsCloseable = false;
            leftpanel.DockableStyle = DockableStyle.DockableToBorders;
            leftpanel.Width = 350; // i know this will not work
            leftpanel.Show(dockManager, AnchorStyle.Left);
            leftpanel.Activate();

        }

Thanks,

thenndral