I'm having a little trouble setting up my layout initializer following some of the examples and tutorials I've found online. Below is similar to how I'd like my layout to be:
However, this is how it's currently looking:
Below is how I'm implementing the BeforeInsertAnchorable method.
public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
{
if (anchorableToShow == null)
{
throw new ArgumentNullException(nameof(anchorableToShow));
}
if (destinationContainer != null && destinationContainer.FindParent<LayoutFloatingWindow>() != null)
{
return false;
}
anchorableToShow.CanShowOnHover = false;
if (anchorableToShow.Content is IProjectExplorerToolViewModel or IConsoleToolViewModel)
{
var group = new LayoutAnchorGroup();
group.Children.Add(anchorableToShow);
layout.BottomSide.Children.Add(group);
anchorableToShow.ToggleAutoHide();
return true;
}
if (anchorableToShow.Content is ISceneHierarchyToolViewModel)
{
var group = new LayoutAnchorGroup();
group.Children.Add(anchorableToShow);
layout.LeftSide.Children.Add(group);
anchorableToShow.ToggleAutoHide();
return true;
}
if (anchorableToShow.Content is IPropertiesToolViewModel or IEntitySystemsToolViewModel)
{
var group = new LayoutAnchorGroup();
group.Children.Add(anchorableToShow);
layout.RightSide.Children.Add(group);
anchorableToShow.ToggleAutoHide();
return true;
}
return false;
}
If anyone can point me in the right direction that would be lovely. For now, I don't care much for saving/loading layouts and just want to have a layout similar to the first screenshot shown above.
I guess my issues are:
How can I add an anchorable pane to another anchorable pane like in the first screenshot (see the project explorer and console tool windows).
How can I resize the initial width and height of the tool windows and perhaps set a minimum and maximum?
Also, is there a better way to ensure that anchorable panes are not automatically hidden when added to a group? This seems almost like a bug having to call ToggleAutoHide for each group.
I'm having a little trouble setting up my layout initializer following some of the examples and tutorials I've found online. Below is similar to how I'd like my layout to be:
However, this is how it's currently looking:
Below is how I'm implementing the
BeforeInsertAnchorable
method.And here is my
LayoutRoot
If anyone can point me in the right direction that would be lovely. For now, I don't care much for saving/loading layouts and just want to have a layout similar to the first screenshot shown above.
I guess my issues are:
ToggleAutoHide
for each group.