Aug 17, 2012 at 6:15 PM
Edited Aug 17, 2012 at 6:21 PM
|
If I add a side anchorable then a bottom one, the bottom overlaps the side.
---------------------------------------------
| |
|
| | Side
|
| |
|
|--------------------------------------------|
|
|
| Bottom |
|
|
---------------------------------------------
But if I add a bottom anchorable then a side, the side anchorable overlaps the bottom:
---------------------------------------------
| |
|
| |
|
| | Side
|
|----------------------------- | |
| |
|
| Bottom | |
| |
|
---------------------------------------------
I would like to be able to control this so my anchorables will have a deterministic ratio of space.
Is there a way to do this?
NOTE:
In case it is needed, here is how I add my anchorables. I call this in my ILayoutUpdateStrategy.BeforeInsertAnchorable method.
private static LayoutAnchorablePane AddAnchorable(LayoutAnchorable anchorableToShow,LayoutRoot layout, AnchorSide anchorSide, AnchorableShowStrategy anchorableShowStrategy)
{
var addedToLayout = false;
if (!(anchorableToShow.IsHidden || anchorableToShow.IsVisible))
{
anchorableToShow.AddToLayout(layout.Manager, anchorableShowStrategy);
addedToLayout = true;
}
var anchorablePane = layout.Descendents().OfType<LayoutAnchorablePane>() .FirstOrDefault(p => p.GetSide() == anchorSide);
if (!addedToLayout)
{
anchorablePane.Children.Add(anchorableToShow);
anchorableToShow.IsSelected = true;
}
return anchorablePane;
}
|