diff --git a/samples/ControlCatalog/Pages/ContextFlyoutPage.xaml.cs b/samples/ControlCatalog/Pages/ContextFlyoutPage.xaml.cs index 8bd1f4d85ae..0388eee4e22 100644 --- a/samples/ControlCatalog/Pages/ContextFlyoutPage.xaml.cs +++ b/samples/ControlCatalog/Pages/ContextFlyoutPage.xaml.cs @@ -36,8 +36,9 @@ public ContextFlyoutPage() customContextRequestedBorder.AddHandler(ContextRequestedEvent, CustomContextRequested, RoutingStrategies.Tunnel); var cancellableContextBorder = this.Get("CancellableContextBorder"); - cancellableContextBorder.ContextFlyout!.Closing += ContextFlyoutPage_Closing; - cancellableContextBorder.ContextFlyout!.Opening += ContextFlyoutPage_Opening; + var flyout = (Flyout)cancellableContextBorder.ContextFlyout!; + flyout.Closing += ContextFlyoutPage_Closing; + flyout.Opening += ContextFlyoutPage_Opening; } private ContextPageViewModel? _model; diff --git a/samples/ControlCatalog/Pages/FlyoutsPage.axaml b/samples/ControlCatalog/Pages/FlyoutsPage.axaml index 36e2e8f4f81..c0521cd3ba5 100644 --- a/samples/ControlCatalog/Pages/FlyoutsPage.axaml +++ b/samples/ControlCatalog/Pages/FlyoutsPage.axaml @@ -16,8 +16,13 @@ + + + + + - + @@ -136,6 +141,15 @@ +