Unlike wpf, uwp apps can't close their mainpage programatically. Window.Current.Close() fails when executed on mainpage of the app. What is the correct way of closing the mainpage in uwp??
How to close main window of uwp programmatically
961 views Asked by Soumya Mahunt At
1
There are 1 answers
Related Questions in WINDOWS
- how to play a sounds in c# forms?
- Echo behaviour of Microsoft Windows Telnet Client
- Getting error while running spark-shell on my system; pyspark is running fine
- DirectX 9 With No SDK Installed - How To Translate a D3DMATRIX?
- Gradle 8.7 cannot find installed JDK 22 in IntelliJ
- 'IOException: The cloud file provider is not running', when trying to delete 'cloud' folder
- Cannot load modules/mod_dav_svn.so into server
- Issue with launching application after updating ElectronJs to version 28.0.0 on Windows and Linux
- 32-bit applications do not display some files in Windows 10
- 'bun' is not recognized as an internal or external command
- mkssecreenshotmgr taking a screenshot
- Next js installation in windows 7 os
- Can't resize a partition using Mini Tool?
- Is there any way to set a printer as default according with Active Directory Policy Security Group and PC hostname?
- Electron Printing not working on Windows (Works on Mac)
Related Questions in UWP
- How to make that each seller has its own different set of products using sqlite and uwp
- How can i solve SQLITE_IOERR_SEEK on Unreal UWP application on MS Hololens2
- UWP Blank app throws error code: The app didn't start.. Activation phase: COM ActivateExtension
- How can I tell if a control is actually Visible in UWP?
- DEP0700: Registration of the app failed UWP in release mode
- Linker errors when adding a native c++ static library to Windows runtime component (UWP)
- uwp app only accepts input whenever i have opened on conhost/powershell/cmd
- uwp - WebAuthenticationBroker does not show cloudflare captcha
- How do I get the typename of an arbitrary XAML FrameworkElement?
- Apryse PDFTron SetDoc method throws AccessViolationException
- How do you know which items are realized (non-virtualized) in an ItemsRepeater?
- How to copy or drag n drop image from Webview2 to Canvas?
- UWP app Shutdown PC don't work in kiosk mode
- Path denied error when building UWP app in release
- Display Data from Drive D: in the Gridview
Related Questions in WINDOWS-10-UNIVERSAL
- uwp app only accepts input whenever i have opened on conhost/powershell/cmd
- Apryse PDFTron SetDoc method throws AccessViolationException
- "Java JDK Installation Issue on Windows 10: 'Java installation is already in process'"
- Rancher desktop Error: wsl.exe exited with code 4294967295
- Provisioning package with UWP application is not installed on the last Windows 10 and Windows 10 Team version
- Is startup on user login and setting persistence possible with Desktop Bridge or UWP on Surface Hub?
- I have an issue with AudioGraph in Universal Window Platform
- UWP Split view opens for one second
- How to determine if UWP app is running with windows open?
- Migrate UWP project from VS 2015 to VS 2022 and from windows 8.1 to windows 10
- How to fix the ApiValidator issue (ApiValidation: Error: XXX.sys has unsupported API call to "ntoskrnl.exe!KeGetCurrentIrql")
- How to get a unique userid in Microsoft Store API
- How to hide elements and reserve its space in UWP
- How to change reveal effect color in button in UWP?
- Windows.Universal Javascript PWA app uses Edge legacy instead of Edge Chromium
Related Questions in WINDOWS-10-DESKTOP
- How to get windows version output from Powershell with the same output I get from running winver
- UWP app Shutdown PC don't work in kiosk mode
- Setting hotkeys for Mu editor's Python 3 mode on a laptop + issues with the aforementioned mode's file editor
- Can't connect Windows 10 client to AWS Aurora MySQL database after major version upgrade 2 - 3
- How can one open a browser: edge or chrome or firefox, to specific pixel dimensions?
- CORBA Client on Windows 10 takes different amounts of time to connect to the server, depending on the number of IP addresses
- Using GetObject to read data in an Access Query into Word VBA
- Registry key not found after Java10 installation on Win10
- How do I test if the changes I made to the Windows 10 Update process work
- Keyboard remapping on Windows 10: How can I map a long-pressed Enter/Return key to a modifier key (e.g. Ctrl)?
- Is it possible to pin app programmatically in Winforms app on windows 10?
- Running application as non-administrative user while elevated
- How to correctly run Remote Applications using RDS RemoteApps?
- C# sync tool - FileInfo.LastWriteTimeUtc compare - Windows 10 changed time stamp by switch from winter to summer time
- To activate the telegram.exe
Related Questions in UWP-NAVIGATION
- Adding a div affter Ul menu in wordpress meue using navwalker
- NavigationView icons + text in compact mode
- How to Navigate in UWP to another xaml page by clicking a button?
- Open AppServices connection from UWP to Win32
- UWP Hide Window Title Bar controls
- UWP MVVM NavigationView BackButton - Detect when it is pressed
- How to resize NavigationView and SplitView in UWP
- Automatically navigate to a new page after a time in UWP
- How to improve app performance when clicking hamburger menu items in UWP?
- How to navigate to screen selected by Graphics capture picker in UWP
- UWP - AppShell.xmal - MUXC:NavigationViewItem - List of available Icons (not costume made)
- How do I get the Frame to collapse and expand when PaneDisplayMode is LeftCompact?
- In UWP, how to skip tab key navigation for an UserControl and all of its child element?
- UWP Frame backword navigation to partiular page
- Map not showing up on the loading of UWP Application
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Executing
ApplicationView.GetForCurrentView().TryConsolidateAsync()in main window, closes it properly as if you have closed it by clicking close button in title bar. If app has only one window per instance this is preferred overApplication.Exit()as this method suspends the app whileApplication.Exit()closes app abruptly. Also closing app by this method your app's previous position and size is remembered unlike forApplication.Exit().