Open xceedsoftware opened 7 years ago
BoucherS[CodePlex]
――――
Get more controls, features, updates and technical support with
Xceed Toolkit Plus for WPF
BoucherS[CodePlex]
You are doing right in your samples. Just define 1 LayoutAnchorable per LayoutAnchorablePaneGroup will let you auto-hide only 1 Window.
When the LayoutAnchorables are grouped, auto-hiding the group should auto-hide all of its LayoutAnchorables. You can not, at the moment ,auto-hide only 1 LayoutAnchorable from a LayoutAnchorablePanegroup.
Issue https://wpftoolkit.codeplex.com/workitem/22503 has been created to address this.
maratmusaev[CodePlex]
If there are two or three LayoutAnchorables is in LayoutAnchorablePaneGroup is the way just to auto hide a single window instead of the whole group? It would be nice auto hide just a single window and have the flexibility to keep others not being auto
hidden.
Thank you, Marat
BoucherS[CodePlex]
Hi,
Can you be more precise, based on your sample ? If you have a LayoutAnchorablePaneGroup with some LayoutAnchorables, auto-hidding the group will auto-hide all of its children.
―――― Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF
maratmusaev[CodePlex]
Seems solves the issue. Thank you.
I have a question though. Why when clicked on auto hide button the whole group gets auto hidden not just individual window? Is there any way to make just the target window to be auto hidden not the whole group?
BoucherS[CodePlex]
Hi,
Can you go in file : -Xceed.Wpf.AvalonDock/Layout/Extensions.cs, and replace the GetSide method with : public static AnchorSide GetSide( this ILayoutElement element ) { var parentContainer = element.Parent as ILayoutOrientableGroup; if( parentContainer != null ) { var layoutPanel = parentContainer as LayoutPanel; if( layoutPanel == null ) { layoutPanel = parentContainer.FindParentLayoutPanel(); }
if( (layoutPanel != null) ( layoutPanel.Children.Count 0 ) )
{
if( layoutPanel.Orientation == System.Windows.Controls.Orientation.Horizontal )
return layoutPanel.Children[ 0 ].Descendents().Contains( element ) ? AnchorSide.Left : AnchorSide.Right;
return layoutPanel.Children[ 0 ].Descendents().Contains( element ) ? AnchorSide.Top : AnchorSide.Bottom;
}
}
Debug.Fail( Unable to find the side for an element, possible layout problem! );
return AnchorSide.Right;
}
Tell me if it helps. Thanks ―――― Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF
maratmusaev[CodePlex]
Here is the sample app attached. I have three xml files that contain layout of the windows. They are called LayoutXml1, LayoutXml2 and LayoutXml3. Using combo box you can load those different layouts.
The layout that we want is LayoutXml2.xml file which is No Document option in the combo box. LayoutXml2 option does not have LayoutDocumentPaneGroup, which causes this issue of docking everything to the right.
LayoutXml1 and LayoutXml3 work correctly when clicking auto hide - docks in a right position not everything to the right of main window. However, LayoutXml1 has a big gap between Window2/Window3 and Window4. If I could get right this gap than I would use this option. This gap is due to the presence LayoutDocumentPaneGroup. LayoutXml3 has tabbed document which is not what we want.
Let me if this is clear.
maratmusaev[CodePlex]
I will try to create a sample and submit it when I can. However, I think it can be reproduced easily.
1) Create an app using AvalonDock. 2) Run the app and arrange the windows/usercontrols contained in AvalonDock windows. 3) Close the app and persists the windows settings into xml file. 4) Restart the app and click auto hide(AvalonDocks autohide button) on any of the windows - AvalonDock docks window to the right.
BoucherS[CodePlex]
Hi,
Can you submit a sample of this please. Give exact steps to reproduce and AvalonDock version (3.0, 3.1, 3.2....) Thanks.
―――― Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF
Today I downloaded the March 5, 2018 v3.3.0 version of Toolkit. AvalonDock still contains a gap between the windows. I described the issue in the above message with sample solution that I provided last year (This blog was hosted on CodePlex site). I remember someone suggested a solution and worked, but I can't remember the solution he gave me.
Here is the original question from above:
"maratmusaev[CodePlex] Here is the sample app attached. I have three xml files that contain layout of the windows. They are called LayoutXml1, LayoutXml2 and LayoutXml3. Using combo box you can load those different layouts. The layout that we want is LayoutXml2.xml file which is No Document option in the combo box. LayoutXml2 option does not have LayoutDocumentPaneGroup, which causes this issue of docking everything to the right. LayoutXml1 and LayoutXml3 work correctly when clicking auto hide - docks in a right position not everything to the right of main window. However, LayoutXml1 has a big gap between Window2/Window3 and Window4. If I could get right this gap than I would use this option. This gap is due to the presence LayoutDocumentPaneGroup. LayoutXml3 has tabbed document which is not what we want." Thanks.
Hi, This could already have been fixed in more recent versions. Users of Plus version have v3.7 Users of community version have v3.4. You can try v3.7 for free for 45 days here : http://xceed.com/xceed-toolkit-plus-for-wpf/
Since Codeplex has closed, could you attached your sample on github (if not already resolved in latest version) Thank you.
It always "pins" to the right side, even if the anchor is added to LayourRoot.LeftSide via code-behind using a custom ILayoutUpdateStrategy. Here is a fix that worked great for me.
Exensions.cs
public static AnchorSide GetSide(this ILayoutElement element)
{
var parentContainer = element.Parent as ILayoutOrientableGroup;
if (parentContainer != null)
{
if (!parentContainer.ContainsChildOfType<LayoutDocumentPaneGroup, LayoutDocumentPane>())
return GetSide(parentContainer);
foreach (var childElement in parentContainer.Children)
{
if (childElement == element ||
childElement.Descendents().Contains(element))
return parentContainer.Orientation == System.Windows.Controls.Orientation.Horizontal ?
AnchorSide.Left : AnchorSide.Top;
var childElementAsContainer = childElement as ILayoutContainer;
if (childElementAsContainer != null &&
(childElementAsContainer.IsOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>() ||
childElementAsContainer.ContainsChildOfType<LayoutDocumentPane, LayoutDocumentPaneGroup>()))
{
return parentContainer.Orientation == System.Windows.Controls.Orientation.Horizontal ?
AnchorSide.Right : AnchorSide.Bottom;
}
}
}
Debug.Fail("Unable to find the side for an element, possible layout problem!");
return AnchorSide.Right;
}
Regards, Travis
It's doing the same thing with me as well.
This issue of always hiding to the right side is causing us pain as well. Can you please revert the changes to GetSide made in 3.4 ?
Hi,
Did you try with the latest version ? http://xceed.com/xceed-toolkit-plus-for-wpf/
Can you confirm that this is fixed in the latest v3.7 version ? Thank you
No, since I cannot use the Plus Edition.
You can try it for free for 45 days here : http://xceed.com/xceed-toolkit-plus-for-wpf/
maratmusaev[CodePlex]
Avalondock 3 autohide button always auto hides to the right. Can anyone help to resolve the issue?