简体   繁体   中英

How to move window when in compact mode using MediaPlayerElement

I'm using MediaPlayerElement , and using compact mode.

<CustomMediaTransportControls
     IsCompactOverlayEnabled="True"
     IsCompactOverlayButtonVisible="True">
</CustomMediaTransportControls>

But when enter compact mode, I can't mode the window, because there is no TitleBar in compact mode, just a close button. So anyone know how?

在此处输入图片说明

The reason you want the titlebar is to minimize the window? When an app window enters compact overlay mode, it'll be shown above other windows so it won't get blocked, it seems can't be minimized. You can only click the button in the lower right corner of the image to get back to the normal app layout window and then minimize your window.

Update:

If you set Window.Current.SetTitleBar(AppTitleBar); to define a draggable region, the system shrinks the default draggable region down to a small area the size of a caption button. This means when you enter compact overlay mode, it is actually draggable. The draggable region positioned to the right of the close button but it is a small area. If you want to the rectangle that is the width of the window, the height of the close button can drag, you can pass null as the parameter to SetTitleBar to revert to the default dragging behavior, like Window.Current.SetTitleBar(null);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM