Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@
<MauiFont Include="Resources\Fonts\*" />

<PackageReference Include="Microsoft.Maui.Controls" Version="*" />
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="7.0.1" />
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="8.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="10.5.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.6" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="10.9.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.11" />
</ItemGroup>

<PropertyGroup>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">17.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">17.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">26.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.19041.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
Expand Down
2 changes: 0 additions & 2 deletions samples/CommunityToolkit.Maui.Sample/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
using Microsoft.Maui.Platform;
#endif

[assembly: XamlCompilation(XamlCompilationOptions.Compile)]

namespace CommunityToolkit.Maui.Sample;

public static class MauiProgram
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ partial class SampleScaleAnimation : BaseAnimation
{
public override async Task Animate(VisualElement view, CancellationToken token = default)
{
#if NET11_0_OR_GREATER
await view.ScaleToAsync(1.2, Length, Easing, token);
await view.ScaleToAsync(1, Length, Easing, token);
#else
await view.ScaleToAsync(1.2, Length, Easing).WaitAsync(token);
await view.ScaleToAsync(1, Length, Easing).WaitAsync(token);
#endif
}
}

Expand All @@ -25,5 +30,9 @@ partial class SampleScaleToAnimation : BaseAnimation
public double Scale { get; set; }

public override Task Animate(VisualElement view, CancellationToken token = default)
#if NET11_0_OR_GREATER
=> view.ScaleToAsync(Scale, Length, Easing, token);
#else
=> view.ScaleToAsync(Scale, Length, Easing).WaitAsync(token);
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ public StateContainerPage(StateContainerViewModel viewModel) : base(viewModel)
Padding = new Thickness(12, 12, 12, 0);
}

static Task ScaleToAsync(VisualElement element, double scale, uint length, Easing easing, CancellationToken token)
#if NET11_0_OR_GREATER
=> element.ScaleToAsync(scale, length, easing, token);
#else
=> element.ScaleToAsync(scale, length, easing).WaitAsync(token);
#endif

async void ChangeStateWithFadeAnimation(object? sender, EventArgs e)
{
var currentState = StateContainer.GetCurrentState(GridWithAnimation);
Expand All @@ -31,17 +38,17 @@ async void ChangeStateWithCustomAnimation(object? sender, EventArgs e)
{
await StateContainer.ChangeStateWithAnimation(GridWithAnimation,
null,
(element, token) => element.ScaleToAsync(0, 100, Easing.SpringIn).WaitAsync(token),
(element, token) => element.ScaleToAsync(1, 250, Easing.SpringOut).WaitAsync(token),
(element, token) => ScaleToAsync(element, 0, 100, Easing.SpringIn, token),
(element, token) => ScaleToAsync(element, 1, 250, Easing.SpringOut, token),
CancellationToken.None);
}

else
{
await StateContainer.ChangeStateWithAnimation(GridWithAnimation,
"ReplaceGrid",
(element, token) => element.ScaleToAsync(0, 100, Easing.SpringIn).WaitAsync(token),
(element, token) => element.ScaleToAsync(1, 250, Easing.SpringOut).WaitAsync(token),
(element, token) => ScaleToAsync(element, 0, 100, Easing.SpringIn, token),
(element, token) => ScaleToAsync(element, 1, 250, Easing.SpringOut, token),
CancellationToken.None);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.15.7" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.15.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommunityToolkit.Maui.Analyzers.UnitTests\CommunityToolkit.Maui.Analyzers.UnitTests.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="1.1.3" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="1.1.3" />
<PackageReference Include="xunit.v3.mtp-v2" Version="3.2.0" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.1.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="1.1.4" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="1.1.4" />
<PackageReference Include="xunit.v3.mtp-v2" Version="3.2.2" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(CodeAnalysisVersion)" />
</ItemGroup>

<ItemGroup>
<!--Fix vulnerabilities-->
<PackageReference Include="System.Formats.Asn1" Version="10.0.0" />
<PackageReference Include="System.Formats.Asn1" Version="10.0.11" />
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' and '$(NetVersion)' == 'net11.0'">17.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' and '$(NetVersion)' != 'net11.0'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' and '$(NetVersion)' == 'net11.0'">24.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' and '$(NetVersion)' != 'net11.0'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>CommunityToolkit.Maui</RootNamespace>
Expand Down Expand Up @@ -58,8 +60,8 @@
<PackageReference Include="Xamarin.AndroidX.Camera.Camera2" Version="1.4.2.3" />
<PackageReference Include="Xamarin.AndroidX.Camera.View" Version="1.4.2.3" />
<PackageReference Include="Xamarin.AndroidX.Camera.Extensions" Version="1.4.2.3" />

<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.10.1.3" />
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.13.0.1" Condition="'$(NetVersion)' == 'net11.0'" />
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.10.1.3" Condition="'$(NetVersion)' != 'net11.0'" />

<!-- Ensure Linker does not remove required libraries -->
<None Include="linker.xml" Pack="true" PackagePath="build\$(PackageId).LinkerConfigurationFile.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' and '$(NetVersion)' == 'net11.0'">17.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' and '$(NetVersion)' != 'net11.0'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' and '$(NetVersion)' == 'net11.0'">24.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' and '$(NetVersion)' != 'net11.0'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
Expand Down
Loading
Loading