1

How to minimize Application window programmatically on UWP, as if the user clicked on the minimize button on the app bar?

Let's say in my app user clicked a button to perform some processing, and now there's nothing left to do but wait until it finishes. In that case I would like to minimize my app automatically.

How to do that?

This is for C++ Windows Universal App.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Esenthel
  • 499
  • 4
  • 17
  • 1
    There is currently no facility for a UWP app to minimize itself. (What would that even mean on a phone or HoloLens?) – Raymond Chen May 10 '17 at 05:11
  • 1
    On phone that would mean the same thing as user pressing the Home key - going to the main screen. Would be great if MS could add this. I need it mainly for Desktop, but would be cool for Phone too. Classic WinAPI has this functionality, and even Android does. UWP should too. – Esenthel May 10 '17 at 08:46

1 Answers1

2

This is not supported today. Programmatic suspension is an item on our backlog that has not been scheduled/prioritized yet.

Please use UserVoice to submit and/or vote on the feature request. This existing item is probably the closest to your ask: https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/18076333-allow-an-window-to-minimize-programatically

UPDATE
This is now possible, starting with Windows 10 build 1803: Minimize UWP programatically

Stefan Wick MSFT
  • 13,600
  • 1
  • 32
  • 51
  • this link is broken now, do you know on any progress on this feature? A customer is asking for such a feature on Windows Mobile devices, he will be using our app over App Services like API and needs to hide/minimize our app from time to time. – marcinj Oct 15 '19 at 08:55
  • @marcinj This has been enabled since build 1803: https://stackoverflow.com/questions/50020408/minimize-uwp-programatically/50027301#50027301 – Stefan Wick MSFT Oct 16 '19 at 12:41