diff --git a/src/AtomUI.Controls/AtomUI.Controls.csproj.DotSettings b/src/AtomUI.Controls/AtomUI.Controls.csproj.DotSettings new file mode 100644 index 0000000..8b23a66 --- /dev/null +++ b/src/AtomUI.Controls/AtomUI.Controls.csproj.DotSettings @@ -0,0 +1,2 @@ + + True \ No newline at end of file diff --git a/src/AtomUI.Controls/Drawer/DrawerOpenMode.cs b/src/AtomUI.Controls/Drawer/DrawerOpenMode.cs index 285afa6..cb8d22f 100644 --- a/src/AtomUI.Controls/Drawer/DrawerOpenMode.cs +++ b/src/AtomUI.Controls/Drawer/DrawerOpenMode.cs @@ -2,6 +2,6 @@ namespace AtomUI.Controls; public enum DrawerOpenMode { - Overlay, - Push, + Overlay = 0, + Push = 1, } \ No newline at end of file diff --git a/src/AtomUI.Controls/Primitives/AtomLayer/AtomLayerExtension.cs b/src/AtomUI.Controls/Primitives/AtomLayer/AtomLayerExtension.cs index 890bdee..9ea23eb 100644 --- a/src/AtomUI.Controls/Primitives/AtomLayer/AtomLayerExtension.cs +++ b/src/AtomUI.Controls/Primitives/AtomLayer/AtomLayerExtension.cs @@ -1,6 +1,7 @@ using Avalonia; using Avalonia.Controls; using Avalonia.Controls.Presenters; +using Avalonia.Controls.Primitives; using Avalonia.Layout; using Avalonia.VisualTree; @@ -25,6 +26,8 @@ public static class AtomLayerExtension } } + host ??= target.FindAncestorOfType(); + host ??= TopLevel.GetTopLevel(target); if (host == null)