Skip to content

Conversation

@ne0rrmatrix
Copy link
Member

  • Bug fix

Description of Change

Update customTransportcontrols style properties

Changed the Width property to Auto and added a
MaxWidth property referencing MediaTransportControlsMaxWidth.
Removed the previous Width setting for improved layout flexibility.

Linked Issues

PR Checklist

  • Has a linked Issue, and the Issue has been approved(bug) or Championed (feature/proposal)
  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Documentation created or updated: https://github.com/MicrosoftDocs/CommunityToolkit/pulls

Additional information

This updates the xaml for Media Elements controls in windows to more closely align behavior when using small video dimension sizes. Unlike previous PR this does not update the sample app.

Changed the `Width` property to `Auto` and added a
`MaxWidth` property referencing `MediaTransportControlsMaxWidth`.
Removed the previous `Width` setting for improved layout flexibility.
Copilot AI review requested due to automatic review settings May 30, 2025 19:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the Windows Media Element controls by updating the custom transport controls' style properties to improve layout flexibility.

  • Replaces the fixed Width setter with a dynamically computed MaxWidth property.
  • Sets the Width property to "Auto" to better adapt to content.
Comments suppressed due to low confidence (1)

src/CommunityToolkit.Maui.MediaElement/ResourceDictionary.windows.xaml:9

  • [nitpick] Consider placing the MaxWidth and Width setters together in a logical grouping for readability and maintainability; verify that the order does not unintentionally affect layout behavior.
<Setter Property="MaxWidth" Value="{StaticResource MediaTransportControlsMaxWidth}" />

@VladislavAntonyuk VladislavAntonyuk merged commit 1f66404 into CommunityToolkit:main Jul 4, 2025
10 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Media Element Popup Dimensions

2 participants