SHIN JaeGuk
SHIN JaeGuk

Reputation: 511

UWP MediaPlayerElement weird Play button appearance when MediaTransportContols.IsCompact is True

How can I show a correct play button of compact MediaPlayerElement in version 1903?

The below image is a normal play button of MediaPlayerElement on which the mouse pointer (not captured) is.

enter image description here

The below image is in the case of this code, just a COMPACT view.

<MediaPlayerElement AreTransportControlsEnabled="True">
    <MediaPlayerElement.TransportControls>
        <MediaTransportControls IsCompact="True"/>
    </MediaPlayerElement.TransportControls>
</MediaPlayerElement>

enter image description here

The only play button has a weird appearance which doesn't have the bottom border. Any other buttons are appropriate as follows.

enter image description here

Upvotes: 0

Views: 48

Answers (1)

Roy Li - MSFT
Roy Li - MSFT

Reputation: 8681

This is by design. I checked the template of the MediaTransportControls. It shows the play button is not the original play button when the mode isn't in compact mode. It's a button called PlayPauseButtonOnLeft that will be hidden when the MediaPlayerElement is the normal mode.

If you want to change this behavior, you could re-template the transport control, change the style or the position of the button. Here is the document that you could refer to Customize the transport controls

Upvotes: 1

Related Questions