Browse Source

Layout integration seems to be working now

pull/1016/head
Nikita Tsukanov 9 years ago
parent
commit
09c9d7b7d5
  1. 2
      src/Avalonia.Layout/LayoutManager.cs
  2. 2
      src/Avalonia.Layout/Layoutable.cs
  3. 10
      src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs

2
src/Avalonia.Layout/LayoutManager.cs

@ -151,7 +151,7 @@ namespace Avalonia.Layout
if (root != null)
{
root.Arrange(new Rect(root.DesiredSize));
root.Arrange(new Rect(root.ClientSize));
}
else if (parent != null)
{

2
src/Avalonia.Layout/Layoutable.cs

@ -399,7 +399,7 @@ namespace Avalonia.Layout
}
/// <inheritdoc/>
public virtual void ChildDesiredSizeChanged(ILayoutable control)
void ILayoutable.ChildDesiredSizeChanged(ILayoutable control)
{
if (!_measuring)
{

10
src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs

@ -40,10 +40,10 @@ namespace Avalonia.Win32.Interop.Wpf
EnforceClientSize = false;
}
public override void ChildDesiredSizeChanged(ILayoutable control)
public override void InvalidateMeasure()
{
((FrameworkElement)PlatformImpl)?.InvalidateMeasure();
base.ChildDesiredSizeChanged(control);
base.InvalidateMeasure();
}
protected override void HandleResized(Size clientSize)
@ -52,12 +52,6 @@ namespace Avalonia.Win32.Interop.Wpf
LayoutManager.Instance.ExecuteLayoutPass();
Renderer?.Resized(clientSize);
}
protected override void ArrangeCore(Rect finalRect)
{
base.ArrangeOverride(finalRect.Size);
Bounds = finalRect;
}
}
public WpfTopLevelImpl()

Loading…
Cancel
Save