A community member has associated this post with a similar question:
Handling of UWP child window closing behavior
Only moderators can edit this content.
UWP Child Windows Close event
UWP Experts ,
From the main App , I create child windows from the below code . One of the requirement is to disable the closing of window when it is opened and enable it only after certain seconds. Is there a way to achieve this? I don't see any event to handle this. ContentDialog was an option with the custom close button , but the content dialog is always sticky and not movable . Also it doesn't have have the default minimize/maximize buttons .
CoreApplicationView newView = CoreApplication.CreateNewView(); int newViewId = 0; await newView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { Frame frame = new Frame(); frame.Navigate(typeof(XXXXPage)); ApplicationView.PreferredLaunchViewSize = new Size(480, 800); ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize; Window.Current.Content = frame; Window.Current.Activate(); newViewId = ApplicationView.GetForCurrentView().Id; }); bool viewShown = await ApplicationViewSwitcher.TryShowAsStandaloneAsync(newViewId);
Please let me know your views on this.
Thanks