Răsfoiți Sursa

Use GetTopLevel method

daniel 2 ani în urmă
părinte
comite
7e8c34fc92
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      samples/ControlCatalog/MainView.xaml.cs

+ 1 - 1
samples/ControlCatalog/MainView.xaml.cs

@@ -60,7 +60,7 @@ namespace ControlCatalog
             {
             {
                 if (flowDirections.SelectedItem is FlowDirection flowDirection)
                 if (flowDirections.SelectedItem is FlowDirection flowDirection)
                 {
                 {
-                    ((TopLevel)this.VisualRoot!).FlowDirection = flowDirection;
+                    TopLevel.GetTopLevel(this).FlowDirection = flowDirection;
                 }
                 }
             };
             };