From 4bcdbd4e59c910ed906312d55faff8dd9ae7bf16 Mon Sep 17 00:00:00 2001 From: David Ortinau Date: Fri, 20 Mar 2026 10:23:32 -0500 Subject: [PATCH] Upgrade VideoApp to net10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update TargetFrameworks to net10.0 - Upgrade Reactor.Maui to 4.0.16 - Add explicit Microsoft.Maui.Controls 10.0.50 reference - Bump iOS/macCatalyst SupportedOSPlatformVersion to 16.0 - Fix breaking API changes from Reactor.Maui v2/v3 → v4 - Upgrade CommunityToolkit.Maui.MediaElement to 8.0.1 - Fix ShowsPlaybackControlsProperty → ShouldShowPlaybackControlsProperty - Fix UseMauiCommunityToolkitMediaElement new required parameter - Verified build succeeds for net10.0-ios Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- VideoApp/Controls/MediaElement.cs | 4 ++-- VideoApp/MauiProgram.cs | 5 +---- VideoApp/VideoApp.csproj | 16 ++++++++-------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/VideoApp/Controls/MediaElement.cs b/VideoApp/Controls/MediaElement.cs index 321e730..7fe1896 100644 --- a/VideoApp/Controls/MediaElement.cs +++ b/VideoApp/Controls/MediaElement.cs @@ -66,7 +66,7 @@ protected override void OnMigrating(VisualNode newNode) if (newAsIMediaElement.SourceUri != null && _controlCache.TryGetValue(newAsIMediaElement.SourceUri, out var player)) { - _nativeControl = player; + _nativeControl = (T?)player; } else { @@ -92,7 +92,7 @@ partial void OnEndUpdate() { Validate.EnsureNotNull(NativeControl); var thisAsIMediaElement = (IMediaElement)this; - SetPropertyValue(NativeControl, CommunityToolkit.Maui.Views.MediaElement.ShowsPlaybackControlsProperty, thisAsIMediaElement.ShowsPlaybackControls); + SetPropertyValue(NativeControl, CommunityToolkit.Maui.Views.MediaElement.ShouldShowPlaybackControlsProperty, thisAsIMediaElement.ShowsPlaybackControls); if (thisAsIMediaElement.SourceUri != null) { diff --git a/VideoApp/MauiProgram.cs b/VideoApp/MauiProgram.cs index 80ecb6b..f48ded8 100644 --- a/VideoApp/MauiProgram.cs +++ b/VideoApp/MauiProgram.cs @@ -12,10 +12,7 @@ public static MauiApp CreateMauiApp() var builder = MauiApp.CreateBuilder(); builder .UseMauiReactorApp() - .UseMauiCommunityToolkitMediaElement() -#if DEBUG - //.EnableMauiReactorHotReload() -#endif + .UseMauiCommunityToolkitMediaElement(false) .ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); diff --git a/VideoApp/VideoApp.csproj b/VideoApp/VideoApp.csproj index b88c675..a713719 100644 --- a/VideoApp/VideoApp.csproj +++ b/VideoApp/VideoApp.csproj @@ -1,7 +1,7 @@  - net9.0-android;net9.0-ios + net10.0-android;net10.0-ios Exe VideoApp true @@ -15,8 +15,8 @@ 1.0 1 - 14.2 - 14.0 + 16.0 + 16.0 21.0 10.0.17763.0 10.0.17763.0 @@ -37,14 +37,14 @@ - - - + - - + + + + \ No newline at end of file