This project is read-only.

A size issue

Jul 4, 2010 at 8:40 PM
Edited Jul 5, 2010 at 1:41 PM

There is something strange going on when you add a DockableContent to the xaml and resize it.

In order to simulate this issue, I took the AvalonDock.DemoApp sample application and added the following to MainWindow.xaml:

                                    ...

                   <ad:DockablePane SelectedIndex="1" >
                        <local:SampleDockableContent x:Name="Content1" Title="Content1" Icon="Images\database.png"/>
                        <local:SampleDockableContent x:Name="Content2" Title="Content2" Icon="Images\database.png"/>
                        <local:SampleDockableContent x:Name="Content3" Title="Content3" Icon="Images\database.png"/>
                        <ad:DockableContent x:Name="Content9" Title="Content9">
                            <StackPanel>
                                <Button>test</Button>
                            </StackPanel>
                        </ad:DockableContent>
                    </ad:DockablePane>

                                      ...

When the application is started, hover over content9 to make it visible. Then resize content9 to a large width, hover over content1, then hover over content9 again to make it visible. The with of content9 is the same as it was last resized, which is ok.

Then: hover over content9 to make it visible, resize content9 to a very small width, hover over content1, then hover over content9 again to make it visible. The with of content9 is larger then when it was last resized, so larger then the very small size of before.

It seems that there is some kind of minimum width that overrides the actual width, so that a small size is not applied.

Is this a bug? It's kind of a problem because in my application I have small sized dockable content (containing only icons) and the window becomes always bigger than the size I wanted it to be when I resized it the first time.

Thanks!