Reputation: 3
In later versions of Windows 10, the Groove music media player got a mini player feature. Like this.
I was wondering what API groove music is using to get this mini window to also stay on top over all other apps.
Upvotes: 0
Views: 181
Reputation: 8666
You could try the ApplicationViewMode.CompactOverlay mode in UWP apps. This will make the app window show in a compact overlay (picture-in-picture) mode.
You could use the following code to do that:
if (ApplicationView.GetForCurrentView().IsViewModeSupported(ApplicationViewMode.CompactOverlay))
{
// Supported
await ApplicationView.GetForCurrentView().TryEnterViewModeAsync(ApplicationViewMode.CompactOverlay);
//change the UI layout
}
else
{
// Not supported
}
Please do notice you will need to adjust the UI layout after you've entered the compact overlay mode.
Upvotes: 2