Quantcast
Channel: AvalonDock
Viewing all articles
Browse latest Browse all 2690

Commented Unassigned: Size of first time pinned autohide window is wrong [16493]

$
0
0
Steps to reproduce : Init a Layoutmanager by

<avalonDock:LayoutRoot>
<avalonDock:LayoutPanel Orientation="Horizontal">
<avalonDock:LayoutDocumentPaneGroup>
<avalonDock:LayoutDocumentPane>
<avalonDock:LayoutDocument Title="Doc1">
<TextBox/>
</avalonDock:LayoutDocument>
<avalonDock:LayoutDocument Title="Doc2">
<TextBox/>
</avalonDock:LayoutDocument>
</avalonDock:LayoutDocumentPane>

</avalonDock:LayoutDocumentPaneGroup >

<avalonDock:LayoutAnchorablePaneGroup DockWidth="150" DockMinWidth="150" Orientation="Horizontal" >

<avalonDock:LayoutAnchorablePane DockMinWidth="25" >
<avalonDock:LayoutAnchorable Title="Tool 1" CanAutoHide="True" >
<TextBox >fff</TextBox>
</avalonDock:LayoutAnchorable>
<avalonDock:LayoutAnchorable Title="Tool 2" CanAutoHide="True" CanClose="True" CanHide="True" >
<TextBox>ggg</TextBox>
</avalonDock:LayoutAnchorable>
</avalonDock:LayoutAnchorablePane>

</avalonDock:LayoutAnchorablePaneGroup>
</avalonDock:LayoutPanel>
<avalonDock:LayoutRoot.LeftSide>


<avalonDock:LayoutAnchorSide>
<avalonDock:LayoutAnchorGroup >
<avalonDock:LayoutAnchorable Title="Agenda" ContentId="agenda" CanAutoHide="True" >
<TextBlock Text="Agenda Content" Margin="10" FontSize="18" FontWeight="Black" TextWrapping="Wrap" Width="100"/>
</avalonDock:LayoutAnchorable>
<avalonDock:LayoutAnchorable Title="Contacts" ContentId="contacts" CanAutoHide="True" >
<TextBlock Text="Contacts Content" Margin="10" FontSize="18" FontWeight="Black" TextWrapping="Wrap" Width="100"/>
</avalonDock:LayoutAnchorable>
</avalonDock:LayoutAnchorGroup>
</avalonDock:LayoutAnchorSide>


</avalonDock:LayoutRoot.LeftSide>
</avalonDock:LayoutRoot>


Run the application , open the Application and open the Agenda or the Contacts left side autohide Tab.
Then Pin it to stay open. in the current Version the result is that the first time you pin the autohide tab, the width is set to 25 ( Default) .

Expected Behavior: when you pin the tab, the first size shold be nearly the size when being opened with mouseover or click .

My Workaround Suggestion : In LayoutPanelControl Line 69
...
widthToSet = Math.Max(widthToSet, childPositionableModel.DockMinWidth); // not modified

//new bugfix autohidden otherwise pinned autohide windows shrink to 25 pixels when pinned the first time
if (childPositionableModelWidthActualSize.ActualWidth>0)
// end new
Comments: ** Comment from web user: slido **

Sorry Little correction:

//new bugfix autohidden otherwise pinned autohide windows shrink to 25 pixels when pinned the first time
if (childPositionableModelWidthActualSize.ActualWidth>0)
// end new
childPositionableModel.DockWidth = new GridLength(
widthToSet,
GridUnitType.Pixel);
else
//new2
childPositionableModel.DockWidth = new GridLength(
widthToSet,
GridUnitType.Auto);
//end new 2

causes the first pinned size to use as many space as the tabcontent will occupy
maybe not the best solution, but better than a Default of 25 px .


Viewing all articles
Browse latest Browse all 2690

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>