* Fix an issue with Popup size and position on Android
* Update Formatting
* `dotnet format`
---------
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
Co-authored-by: Shaun Lawrence <shaunrlawrence@gmail.com>
* Change to display Popup on Active Window page on Windows
* Add consideration when there is no active window
* Removing null-forgiving and cutting out to a single method
---------
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
Co-authored-by: Shaun Lawrence <shaunrlawrence@gmail.com>
* The most significant changes in the code are related to the `Visibility` and `Width` properties of the `buttonContainer` in the `MauiMediaElement` constructor and the addition of a new conditional statement in the `OnMediaPlayerElementPointerMoved` method.
1. In the `MauiMediaElement` constructor, we added setting of the `Visibility`. Now, the `Visibility` property is set to `Collapsed` in the constructor.
2. A new conditional statement has been added to the `OnMediaPlayerElementPointerMoved` method. If the `Visibility` property of `mediaPlayerElement.TransportControls` is `Collapsed`, the `Visibility` property of `buttonContainer` is also set to `Collapsed` and the method returns early. This behavior was not present in the previous version of the method.
References to the code changes:
- `MauiMediaElement` constructor: [Link to the code change]
- `OnMediaPlayerElementPointerMoved` method: [Link to the code change]
* The most significant changes in the code are related to the visibility of `buttonContainer` and the event handler for `mediaPlayerElement.PointerMoved`. The visibility of `buttonContainer` is now set to match the visibility of `mediaPlayerElement.TransportControls` in both the constructor `MauiMediaElement(MediaPlayerElement mediaPlayerElement)` and the method `OnMediaPlayerElementPointerMoved`. If the visibility of `mediaPlayerElement.TransportControls` is collapsed, the method `OnMediaPlayerElementPointerMoved` no longer sets the visibility of `buttonContainer` to collapsed but simply returns. The event handler for `mediaPlayerElement.PointerMoved` is now removed after the first pointer move event. Lastly, the visibility of `buttonContainer` is set to visible after a delay of 5 seconds.
List of changes:
1. The visibility of `buttonContainer` in the constructor `MauiMediaElement(MediaPlayerElement mediaPlayerElement)` is now set to the visibility of `mediaPlayerElement.TransportControls` instead of being always collapsed. (Code Change 1)
2. In the method `OnMediaPlayerElementPointerMoved`, the visibility of `buttonContainer` is also set to the visibility of `mediaPlayerElement.TransportControls`. (Code Change 2)
3. If the visibility of `mediaPlayerElement.TransportControls` is collapsed, the method `OnMediaPlayerElementPointerMoved` no longer sets the visibility of `buttonContainer` to collapsed but simply returns. (Code Change 3)
4. The event handler for `mediaPlayerElement.PointerMoved` is removed after the first pointer move event. (Code Change 4)
5. The visibility of `buttonContainer` is set to visible after a delay of 5 seconds. (Code Change 5)
* Update src/CommunityToolkit.Maui.MediaElement/Views/MauiMediaElement.windows.cs
Co-authored-by: Gerald Versluis <gerald@verslu.is>
---------
Co-authored-by: Gerald Versluis <gerald@verslu.is>
The most significant changes involve the `CommunityToolkit.Maui.MediaElement.csproj` file and the `fullscreen.svg` image. The `.csproj` file has been updated to include a new `MauiImage` item that points to the `fullscreen.svg` image. This image is included in the build and packaging process. Additionally, references to `Microsoft.Maui.Controls` and `Microsoft.Maui.Controls.Compatibility` have been added. The `fullscreen.svg` image was temporarily removed and then added back, possibly due to an update or version control operation. A new `.targets` file has been created that includes the `fullscreen.svg` image. Lastly, an `ItemGroup` that included the `fullscreen.svg` image was removed from the `.csproj` file, likely as a cleanup operation after moving the image inclusion to the `.targets` file.
List of changes:
1. `CommunityToolkit.Maui.MediaElement.csproj` file updated to include a new `MauiImage` item pointing to `fullscreen.svg` image and references to `Microsoft.Maui.Controls` and `Microsoft.Maui.Controls.Compatibility` added.
2. `fullscreen.svg` image temporarily removed and then added back.
3. New `CommunityToolkit.Maui.MediaElement.targets` file created that includes the `fullscreen.svg` image.
4. `ItemGroup` that included the `fullscreen.svg` image removed from `CommunityToolkit.Maui.MediaElement.csproj` file.
* Updated StatusBarBehavior to use the NavigatedTo event for setting the color and style and updated the Sample app.
* Added fact to verify expected exception on NavigatedTo event.
* Update src/CommunityToolkit.Maui.UnitTests/Behaviors/StatusBarBehaviorTests.cs
It wasn't inside the if before so forgot to remove it after wrapping it :)
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
* Removed unit test I do not know how to trigger OnAttachedTo without using reflection.
* Added enum StatusBarApplyOn to control when the StatusBarBehavior applies its configured color and style.
* Updated sample to use the new enum
---------
Co-authored-by: Mikael Nensén <mikael.nensen@datema.se>
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
Co-authored-by: Shaun Lawrence <shaunrlawrence@gmail.com>
* Windows Snackbar rewrite
Replaces ToastNotification with AppNotificationManager. Fixes Snackbar and Toast execute new instance of the app
* reverted to use maui-package-name-placeholder
* Update Xcode version for net8.0-maccatalyst
---------
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
Co-authored-by: Gerald Versluis <gerald@verslu.is>
* Fix Hot Reload with Popup
Call AddLogicalChild/RemoveLogicalChild when the popup is
shown/closed so that popups are included in the logical (and visual)
tree, so that Hot Reload works for them. The Live Visual Tree VS
UI now shows popup content as well.
Fixes https://github.com/CommunityToolkit/Maui/issues/620
As Shane explained to me, the rule as of MAUI in .NET8 is that
whenenever Parent is set on an Element, AddLogicalChild should
also be called to include the element in the logical children.
RemoveLogicalChild should be called when the Parent is set to null.
This may be more automatic in .NET9, but for .NET8 that's what's needed
so that the logical tree is kept up to date.
* Remove setting the Parent as that's not needed
Shane pointed out that Add/RemoveLogicalChild also updates the parent,
so there's no need for our code to do that as well.
* Protect against NREs for all calls to AddLogicalChild
---------
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
* Fixed issue with tinted image size being set incorrectly.
* Removed commented out code
* Removed unnecessary variable
* Added caching for the blank image
* Ensured that image tint can be removed correctly
* ised "is" not "==" for null comparison
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
* Update naming
---------
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
* Fix IOS bug in media Element when using Popup
* removed unused usings
* Remove accidental IOS build info
* remove extra line added by mistake
* Add Popup Media Element
* Fix Xaml layout
* more xaml fixes
* Rework Shell detection and get Current ViewController
* Update view controller logic to fix Navigation Page CTD
* Remove unused variables and method logic
* Fix for CollectionViewController
* revert breaking changes and mark ctor as [Obsolete]
* Hides the Obsolete ctor from showing up
* Update to fix breaking changes
* fix missing close bracket
---------
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>