diff --git a/src/PlanViewer.App/App.axaml b/src/PlanViewer.App/App.axaml index 03f3a9c2..d6c41328 100644 --- a/src/PlanViewer.App/App.axaml +++ b/src/PlanViewer.App/App.axaml @@ -43,11 +43,11 @@ - + diff --git a/src/PlanViewer.App/Controls/PlanViewerControl.axaml b/src/PlanViewer.App/Controls/PlanViewerControl.axaml index 8df78fab..f7b1b85c 100644 --- a/src/PlanViewer.App/Controls/PlanViewerControl.axaml +++ b/src/PlanViewer.App/Controls/PlanViewerControl.axaml @@ -525,7 +525,7 @@ Background="{DynamicResource BackgroundBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1"> ShowConfirmationDialog(string title, string message, string c private Window GetParentWindow() { - var parent = this.VisualRoot; + /* GetTopLevel rather than VisualRoot because Avalonia 12 hosts a Window inside a + TopLevelHost, so the visual root is no longer the Window and casting it to one always + misses — silently, since VisualRoot still compiles and still returns something. */ + var parent = TopLevel.GetTopLevel(this); return parent as Window ?? throw new InvalidOperationException("No parent window"); } } diff --git a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml index d7a9a952..dcff0565 100644 --- a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml +++ b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml @@ -1,6 +1,7 @@ @@ -94,7 +95,7 @@ @@ -170,12 +171,12 @@ - + - + - + - + - + - + @@ -487,7 +488,8 @@ Background="#80000000" CornerRadius="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> - + diff --git a/src/PlanViewer.App/Controls/QueryStoreHistoryControl.axaml b/src/PlanViewer.App/Controls/QueryStoreHistoryControl.axaml index adda15b0..b59a90c1 100644 --- a/src/PlanViewer.App/Controls/QueryStoreHistoryControl.axaml +++ b/src/PlanViewer.App/Controls/QueryStoreHistoryControl.axaml @@ -1,6 +1,7 @@ @@ -71,7 +72,8 @@ FontSize="12" Foreground="{DynamicResource ForegroundBrush}"/> - +