Browse Source

testtesttest

Nikita Tsukanov 8 years ago
parent
commit
317b0f7034

+ 1 - 1
src/Avalonia.Layout/Layoutable.cs

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

+ 16 - 3
src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs

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