1

I have an UWP app, and I have a button at bottom right corner (chat button), when I click in this button open a new XAML page(for chat window ) from bottom right corner of my XAML home page. I have this code for this:

CoreApplicationView newView = CoreApplication.CreateNewView();
int newViewId = 0;
await newView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
Frame frame = new Frame();
frame.Navigate(typeof(About), null);
Window.Current.Content = frame;
// You have to activate the window in order to show it later.
Window.Current.Activate();

newViewId = ApplicationView.GetForCurrentView().Id;
});
bool viewShown = await 
ApplicationViewSwitcher.TryShowAsStandaloneAsync(newViewId);

I want to set a fixed size for this second XAML (About) page and I am using this code:

ApplicationView.PreferredLaunchViewSize = new Size(480, 800);
ApplicationView.PreferredLaunchWindowingMode = 
ApplicationViewWindowingMode.PreferredLaunchViewSize
  • Possible duplicate of [How get different size windows in UWP Multiple Views?](https://stackoverflow.com/questions/39185575/how-get-different-size-windows-in-uwp-multiple-views) – Xie Steven Nov 02 '18 at 03:04

0 Answers0