diff --git a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs index f5d8344bda..b06c4b9695 100644 --- a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs +++ b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs @@ -22,6 +22,11 @@ namespace Avalonia.Platform /// Size ClientSize { get; set; } + /// + /// Gets the maximum size of a window on the system. + /// + Size MaxClientSize { get; } + /// /// Gets the scaling factor for the window. /// diff --git a/src/Avalonia.Controls/Platform/IWindowImpl.cs b/src/Avalonia.Controls/Platform/IWindowImpl.cs index 05a51d02aa..609e9834cb 100644 --- a/src/Avalonia.Controls/Platform/IWindowImpl.cs +++ b/src/Avalonia.Controls/Platform/IWindowImpl.cs @@ -11,11 +11,6 @@ namespace Avalonia.Platform /// public interface IWindowImpl : ITopLevelImpl { - /// - /// Gets the maximum size of a window on the system. - /// - Size MaxClientSize { get; } - /// /// Gets or sets the minimized/maximized state of the window. /// diff --git a/src/Avalonia.Controls/Presenters/ItemsPresenter.cs b/src/Avalonia.Controls/Presenters/ItemsPresenter.cs index 2e586a25e3..fa15766e4d 100644 --- a/src/Avalonia.Controls/Presenters/ItemsPresenter.cs +++ b/src/Avalonia.Controls/Presenters/ItemsPresenter.cs @@ -99,7 +99,7 @@ namespace Avalonia.Controls.Presenters // the available size. if (availableSize == Size.Infinity && VirtualizationMode != ItemVirtualizationMode.None) { - var window = VisualRoot as Window; + var window = VisualRoot as TopLevel; if (window != null) {