Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable .NET 8 for uwp MultiTarget, upgrade packages #584

Merged
merged 48 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d7cbb7a
Fixing CSWinRT1028 warnings, adding partials for AoT.
Arlodotexe Jul 31, 2024
b4b01b6
Suppress internally generated error CsWinRT1028, add notes
Arlodotexe Jul 31, 2024
681c80b
Use preview version of Behaviors
Arlodotexe Aug 5, 2024
0e98071
Added compilation conditionals for missing Windows.UI.Xaml.Automation…
Arlodotexe Aug 5, 2024
12ae6ce
Added compilation conditionals for missing Windows.UI.ColorHelper
Arlodotexe Aug 5, 2024
93847bd
Use Microsoft.UI.Xaml.Automation.ElementNotEnabledException on modern…
Arlodotexe Aug 5, 2024
63d044b
Use color.ToString() as ToDisplayName replacement on modern uwp
Arlodotexe Aug 5, 2024
9ec9f1c
Add source
Arlodotexe Aug 5, 2024
1085dce
Fixing FontWeight and FontStyle namespaces
Arlodotexe Aug 9, 2024
6c17145
Fixed bad property declaration
Arlodotexe Aug 13, 2024
21c072d
Update Microsoft.WindowsAppSDK to 1.6.240807006-preview1, remove CsWi…
Arlodotexe Aug 14, 2024
669e211
Package updates and fixes for modern dotnet on uwp
Arlodotexe Sep 25, 2024
b36a034
Upgrade to latest Microsoft.Xaml.Behaviors.Uwp.Managed and Microsoft.…
Arlodotexe Dec 3, 2024
fcb3b86
Add nullability annotations to converter and extension methods
Arlodotexe Dec 4, 2024
4fc7bc6
Update package references for Uno.Microsoft.Xaml.Behaviors to version…
Arlodotexe Dec 4, 2024
cc4f810
Update SDK version to 9.0.101 in global.json
Arlodotexe Dec 5, 2024
34e8138
Update tooling with latest fixes, update behaviors
Arlodotexe Dec 12, 2024
67d12d0
Delete docs submodule
Arlodotexe Dec 13, 2024
a22b668
Ran XAML styler
Arlodotexe Dec 13, 2024
3f1be96
Upgrade to .NET 9.0 in Dockerfile, devcontainer.json, build.yml, and …
Arlodotexe Nov 18, 2024
5eedeee
Fix null reference by returning empty string for missing localization…
Arlodotexe Nov 18, 2024
7371705
Improved null value handling, fixes net9.0 errors
Arlodotexe Nov 18, 2024
e0b6f31
Update package versions, update tooling pointer
Arlodotexe Nov 22, 2024
d0cb062
Update GitHub Actions runner to use 'windows-latest' instead of 'wind…
Arlodotexe Dec 16, 2024
6e9e401
Use WinUI version of Uno Behaviors package where needed
Arlodotexe Dec 16, 2024
b7f0fac
Fix AoT errors in FrameworkElementExtensions, update submodule
Arlodotexe Dec 16, 2024
32721d9
Revert "Fix AoT errors in FrameworkElementExtensions, update submodule"
Arlodotexe Dec 16, 2024
fd2cdb5
Fix CA2022, Improve asynchronous reading of pixel buffer in ImageCropper
Arlodotexe Dec 17, 2024
74559fe
Fix CS8622, Add nullability annotations to event handler parameters
Arlodotexe Dec 17, 2024
4093b4e
Add suppression message for trimming warning in GetContentControl method
Arlodotexe Dec 17, 2024
8da7547
Only enable suppression message for trimming warning in GetContentCon…
Arlodotexe Dec 17, 2024
94e0c99
Suppress IL2059 warning due to known platform issue in ColorPicker pr…
Arlodotexe Dec 17, 2024
ceba07d
Change Truth method visibility from public to private in ColorPicker …
Arlodotexe Dec 17, 2024
8b44df3
Fix compilation conditions for Wasdk
Arlodotexe Dec 17, 2024
2dbb7d4
Cleanup and refactor TokenizingTextBox automation tests
Arlodotexe Dec 17, 2024
ecc7f41
Cleanup usings and compilation conditionals
Arlodotexe Dec 18, 2024
9ec2554
Update Microsoft.Xaml.Behaviors package references to version 3.0.0-p…
Arlodotexe Dec 18, 2024
500ee81
Explicitly specify Platforms to build when packaging
Arlodotexe Dec 18, 2024
6b5e8ec
Use comma-delimited "Platform" property instead of semicolon-delimite…
Arlodotexe Dec 18, 2024
9b40a94
Fixed an issue where building uwp/uap would result in Microsoft.VCLib…
Arlodotexe Dec 18, 2024
1cafff1
Add workaround to prevent WebView2 from including Microsoft.VCLibs.De…
Arlodotexe Dec 19, 2024
61b1253
Add PullRequests package source to nuget.config
Arlodotexe Dec 20, 2024
f244689
Update components/Extensions/src/Text/StringExtensions.Localization.cs
Arlodotexe Dec 20, 2024
a0cf3a9
Update components/Extensions/src/Text/StringExtensions.Localization.cs
Arlodotexe Dec 20, 2024
79a20d4
Update components/Converters/src/ResourceNameToResourceStringConverte…
Arlodotexe Dec 20, 2024
803c4e2
Fix syntax error
Arlodotexe Dec 20, 2024
3cab228
Use dynamic patch for DOTNET_VERSION
Arlodotexe Dec 20, 2024
029981e
Restore nuget.config to defaults
Arlodotexe Dec 20, 2024
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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# See https://github.com/devcontainers/images/tree/main/src/dotnet for image choices
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:8.0
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:9.0

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"args": {
// Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0
// Append -bullseye or -focal to pin to an OS version.
"VARIANT": "8.0",
"VARIANT": "9.0",
// Options
"NODE_VERSION": "lts/*"
}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ on:
merge_group:

env:
DOTNET_VERSION: ${{ '8.0.201' }}
DOTNET_INSTALL_DIR: dotnet-install
DOTNET_ROOT: dotnet-install
DOTNET_VERSION: ${{ '9.0.x' }}
ENABLE_DIAGNOSTICS: true
MSBUILD_VERBOSITY: normal
#COREHOST_TRACE: 1
Expand Down Expand Up @@ -59,7 +57,7 @@ jobs:
# Build both Uno.UI/WinUI2/UWP and Uno.WinUI/WinUI3/WindowsAppSDK versions of our packages using a matrix
build:
needs: [Xaml-Style-Check]
runs-on: windows-latest-large
runs-on: windows-latest

# See https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs
strategy:
Expand Down
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

<!-- See https://github.com/CommunityToolkit/Windows/pull/567#issuecomment-2498739244 -->
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
<NoWarn>$(NoWarn);TKSMPL0014;</NoWarn>
</PropertyGroup>

<Import Project="Windows.Toolkit.Common.props" />
Expand Down
6 changes: 5 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<Project>
<ItemGroup>
<!-- Workaround for WebView2 on uap pulling in Microsoft.VCLibs.Desktop when it shouldn't -->
<SDKReference Remove="Microsoft.VCLibs.Desktop, Version=14.0" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Release'">
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="6.7.0" PrivateAssets="all" Pack="false" />
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="6.12.1" PrivateAssets="all" Pack="false" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

Expand Down
19 changes: 9 additions & 10 deletions components/Behaviors/samples/InvokeActionsSample.xaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Page x:Class="BehaviorsExperiment.Samples.InvokeActionsActivitySample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ani="using:CommunityToolkit.WinUI.Animations"
xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:local="using:BehaviorsExperiment.Samples"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand All @@ -20,9 +19,9 @@
IsSequential="True">
<ani:StartAnimationActivity Animation="{Binding ElementName=FadeOutAnimation}" />
<ani:InvokeActionsActivity>
<interactions:ChangePropertyAction PropertyName="Foreground"
TargetObject="{Binding ElementName=MyText}"
Value="Purple" />
<interactivity:ChangePropertyAction PropertyName="Foreground"
TargetObject="{Binding ElementName=MyText}"
Value="Purple" />
<!--<mediaactions:PlaySoundAction Source="Assets/Llama.mp3"/>-->
</ani:InvokeActionsActivity>
<ani:StartAnimationActivity Animation="{Binding ElementName=FadeInAnimation}"
Expand Down Expand Up @@ -53,12 +52,12 @@
</TextBlock>

<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Click">
<interactions:ChangePropertyAction PropertyName="Foreground"
TargetObject="{Binding ElementName=MyText}"
Value="White" />
<interactivity:EventTriggerBehavior EventName="Click">
<interactivity:ChangePropertyAction PropertyName="Foreground"
TargetObject="{Binding ElementName=MyText}"
Value="White" />
<behaviors:StartAnimationAction Animation="{Binding ElementName=MoveAnimation}" />
</interactions:EventTriggerBehavior>
</interactivity:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Button>
</Page>
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors"
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity">

<StackPanel MaxWidth="480"
Spacing="8">
<TextBox PlaceholderText="Set the focus to this TextBox and press enter">
<interactivity:Interaction.Behaviors>
<behaviors:KeyDownTriggerBehavior Key="Enter">
<core:CallMethodAction MethodName="IncrementCount"
TargetObject="{x:Bind}" />
<interactivity:CallMethodAction MethodName="IncrementCount"
TargetObject="{x:Bind}" />
</behaviors:KeyDownTriggerBehavior>
</interactivity:Interaction.Behaviors>
</TextBox>
Expand Down
5 changes: 2 additions & 3 deletions components/Behaviors/samples/NavigateToUriActionSample.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors"
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity">

<Button Content="Click to navigate">
<interactivity:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="Click">
<interactivity:EventTriggerBehavior EventName="Click">
<behaviors:NavigateToUriAction NavigateUri="https://aka.ms/toolkit/windows" />
</core:EventTriggerBehavior>
</interactivity:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Button>
</Page>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
xmlns:ani="using:CommunityToolkit.WinUI.Animations"
xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:local="using:BehaviorsExperiment.Samples"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down Expand Up @@ -55,9 +54,9 @@
</Image>

<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Click">
<interactivity:EventTriggerBehavior EventName="Click">
<behaviors:StartAnimationAction Animation="{Binding ElementName=MoveAnimation}" />
</interactions:EventTriggerBehavior>
</interactivity:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Button>
</Page>
8 changes: 4 additions & 4 deletions components/Behaviors/src/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
<Project>
<!-- WinUI 2 / UWP -->
<ItemGroup Condition="'$(IsUwp)' == 'true'">
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.1"/>
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="3.0.0-preview2"/>
</ItemGroup>

<!-- WinUI 2 / Uno -->
<ItemGroup Condition="'$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '2'">
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.3.1-uno.2" />
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Interactivity" Version="3.0.0-dev.17.g7c09b9114d" />
</ItemGroup>

<!-- WinUI 3 / WinAppSdk -->
<ItemGroup Condition="'$(IsWinAppSdk)' == 'true'">
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="3.0.0-preview2" />
</ItemGroup>

<!-- WinUI 3 / Uno -->
<ItemGroup Condition="'$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '3'">
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.3.1-uno.2" />
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Interactivity.WinUI" Version="3.0.0-dev.17.g7c09b9114d" />
</ItemGroup>
</Project>
10 changes: 5 additions & 5 deletions components/CameraPreview/samples/CameraPreviewSample.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected async override void OnNavigatedFrom(NavigationEventArgs e)
await CleanUpAsync();
}

private async void Application_Suspending(object sender, SuspendingEventArgs e)
private async void Application_Suspending(object? sender, SuspendingEventArgs e)
{
if (Frame?.CurrentSourcePageType == typeof(CameraPreviewSample))
{
Expand All @@ -102,7 +102,7 @@ private async void Application_Suspending(object sender, SuspendingEventArgs e)
}
}

private async void Application_Resuming(object sender, object e)
private async void Application_Resuming(object? sender, object e)
{
if (CameraPreviewControl != null)
{
Expand All @@ -113,19 +113,19 @@ private async void Application_Resuming(object sender, object e)
}
}

private void CameraPreviewControl_FrameArrived(object sender, FrameEventArgs e)
private void CameraPreviewControl_FrameArrived(object? sender, FrameEventArgs e)
{
_currentVideoFrame = e.VideoFrame;
}

private void CameraPreviewControl_PreviewFailed(object sender, PreviewFailedEventArgs e)
private void CameraPreviewControl_PreviewFailed(object? sender, PreviewFailedEventArgs e)
{
ErrorBar.Message = e.Error;
ErrorBar.IsOpen = true;
}


private async void CaptureButton_Click(object sender, RoutedEventArgs e)
private async void CaptureButton_Click(object? sender, RoutedEventArgs e)
{
var softwareBitmap = _currentVideoFrame?.SoftwareBitmap;

Expand Down
2 changes: 1 addition & 1 deletion components/ColorPicker/src/ColorPicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ private void UpdateVisualState(bool useTransitions = true)
VisualStateManager.GoToState(this, (Truth(IsColorPaletteVisible, IsColorSpectrumVisible, IsColorChannelTextInputVisible) <= 1) ? "ColorPanelSelectorCollapsed" : "ColorPanelSelectorVisible", useTransitions);
}

public static int Truth(params bool[] booleans)
private static int Truth(params bool[] booleans)
{
return booleans.Count(b => b);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,15 @@
<_LayoutFile Remove="@(_LayoutFile)" Condition="$([System.String]::Copy(&quot;%(_LayoutFile.TargetPath)&quot;).StartsWith('CommunityToolkit.WinUI.Controls.Segmented\'))" />
</ItemGroup>
</Target>

<!--
Known platform issue
error IL2059: Unrecognized value passed to the parameter 'type' of method
'System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle)'.
It's not possible to guarantee the availability of the target static constructor.
-->
<PropertyGroup>
<NoWarn>$(NoWarn)IL2059;</NoWarn>
</PropertyGroup>
</Project>
9 changes: 5 additions & 4 deletions components/Converters/src/ColorToDisplayNameConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ public object Convert(
// Invalid color value provided
return DependencyProperty.UnsetValue;
}
#if HAS_UNO
// ColorHelper.ToDisplayName not yet supported on Uno Platform.
// Track https://github.com/unoplatform/uno/issues/18004
return "Not supported";

#if WINDOWS_UWP && NET8_0_OR_GREATER
// Windows.UI.ColorHelper not yet supported on modern uwp.
// Following advice from Sergio0694
return color.ToString();
#elif WINUI2
return Windows.UI.ColorHelper.ToDisplayName(color);
#elif WINUI3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,18 @@ public sealed partial class ResourceNameToResourceStringConverter : IValueConver
/// <param name="parameter">Optional parameter. Not used.</param>
/// <param name="language">The language of the conversion.</param>
/// <returns>The string corresponding to the resource name.</returns>
public object Convert(object value, Type targetType, object parameter, string language)
public object? Convert(object value, Type targetType, object parameter, string language)
{
if (value == null)
var stringValue = value?.ToString();
if (stringValue is null)
{
return string.Empty;
}

#if WINAPPSDK && !HAS_UNO
return _resourceManager.MainResourceMap.TryGetValue(value.ToString()).ValueAsString;
return _resourceManager.MainResourceMap.TryGetValue(stringValue).ValueAsString;
#else
return _resourceLoader.GetString(value.ToString());
return _resourceLoader.GetString(stringValue);
#endif
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static StringExtensions()
/// You can retrieve this from a UIElement.UIContext, XamlRoot.UIContext (XamlIslands), or Window.UIContext.</param>
/// <returns>string value for given resource or empty string if not found.</returns>
////[SupportedOSPlatform("Windows10.0.18362.0")]
public static string GetViewLocalized(this string resourceKey, UIContext? uiContext = null)
public static string? GetViewLocalized(this string resourceKey, UIContext? uiContext = null)
{
if (uiContext != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,9 @@ public static IEnumerable<FrameworkElement> FindParents(this FrameworkElement el
/// </summary>
/// <param name="element">The parent element.</param>
/// <returns>The retrieved content control, or <see langword="null"/> if not available.</returns>
#if NET8_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2075", Justification = "This method is currently not safe for trimming, and annotations here wouldn't help.")]
#endif
public static UIElement? GetContentControl(this FrameworkElement element)
{
Type type = element.GetType();
Expand Down
15 changes: 14 additions & 1 deletion components/ImageCropper/src/ImageCropper.Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,20 @@ private static async Task CropImageAsync(WriteableBitmap writeableBitmap, IRando
using (var sourceStream = writeableBitmap.PixelBuffer.AsStream())
{
var buffer = new byte[sourceStream.Length];
await sourceStream.ReadAsync(buffer, 0, buffer.Length);
var pos = 0;

while (pos < buffer.Length)
{
var remaining = buffer.Length - pos;
var read = await sourceStream.ReadAsync(buffer, pos, remaining);
if (read == 0)
{
break;
}

pos += read;
}

var bitmapEncoder = await BitmapEncoder.CreateAsync(GetEncoderId(bitmapFileFormat), stream);
bitmapEncoder.SetPixelData(BitmapPixelFormat.Bgra8, BitmapAlphaMode.Premultiplied, (uint)writeableBitmap.PixelWidth, (uint)writeableBitmap.PixelHeight, 96.0, 96.0, buffer);
bitmapEncoder.BitmapTransform.Bounds = new BitmapBounds
Expand Down
5 changes: 2 additions & 3 deletions components/Media/samples/BlurEffectAnimationSample.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ani="using:CommunityToolkit.WinUI.Animations"
xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors"
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:media="using:CommunityToolkit.WinUI.Media">

Expand Down Expand Up @@ -38,9 +37,9 @@
</ani:Explicit.Animations>

<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Loaded">
<interactivity:EventTriggerBehavior EventName="Loaded">
<behaviors:StartAnimationAction Animation="{x:Bind BlurAnimation}" />
</interactions:EventTriggerBehavior>
</interactivity:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Border>
</Page>
5 changes: 2 additions & 3 deletions components/Media/samples/ColorEffectAnimationSample.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ani="using:CommunityToolkit.WinUI.Animations"
xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors"
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:media="using:CommunityToolkit.WinUI.Media">

Expand Down Expand Up @@ -38,9 +37,9 @@
</ani:Explicit.Animations>

<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Loaded">
<interactivity:EventTriggerBehavior EventName="Loaded">
<behaviors:StartAnimationAction Animation="{x:Bind ColorAnimation}" />
</interactions:EventTriggerBehavior>
</interactivity:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Border>

Expand Down
5 changes: 2 additions & 3 deletions components/Media/samples/CrossFadeEffectAnimationSample.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ani="using:CommunityToolkit.WinUI.Animations"
xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors"
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:media="using:CommunityToolkit.WinUI.Media">

Expand Down Expand Up @@ -43,9 +42,9 @@
</ani:Explicit.Animations>

<interactivity:Interaction.Behaviors>
<interactions:EventTriggerBehavior EventName="Loaded">
<interactivity:EventTriggerBehavior EventName="Loaded">
<behaviors:StartAnimationAction Animation="{x:Bind CrossFadeAnimation}" />
</interactions:EventTriggerBehavior>
</interactivity:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
</Border>
</Page>
Loading
Loading