TestLayoutRoot.cs 1021 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (c) The Avalonia Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using Avalonia.Controls;
  4. using Avalonia.Platform;
  5. using Avalonia.Rendering;
  6. namespace Avalonia.Layout.UnitTests
  7. {
  8. internal class TestLayoutRoot : Decorator, ILayoutRoot, IRenderRoot
  9. {
  10. public TestLayoutRoot()
  11. {
  12. ClientSize = new Size(500, 500);
  13. }
  14. public Size ClientSize
  15. {
  16. get;
  17. set;
  18. }
  19. public IRenderer Renderer => null;
  20. public IRenderTarget CreateRenderTarget() => null;
  21. public void Invalidate(Rect rect)
  22. {
  23. }
  24. public Point PointToClient(Point point) => point;
  25. public Point PointToScreen(Point point) => point;
  26. public Size MaxClientSize => Size.Infinity;
  27. public double LayoutScaling => 1;
  28. public ILayoutManager LayoutManager { get; set; } = new LayoutManager();
  29. }
  30. }