From d255e6ebd1e8ba98e7dea13fbe4c92eaf3182688 Mon Sep 17 00:00:00 2001
From: michael-hawker <24302614+michael-hawker@users.noreply.github.com>
Date: Mon, 10 Jul 2023 14:49:10 -0700
Subject: [PATCH 1/5] Move Effects back into Extensions
---
Directory.Build.props | 1 -
.../CommunityToolkit.WinUI.Animations.csproj | 1 -
components/Effects/OpenSolution.bat | 3 --
components/Effects/samples/Dependencies.props | 31 ------------------
.../Effects/samples/Effects.Samples.csproj | 16 ---------
.../Effects/src/AdditionalAssemblyInfo.cs | 13 --------
.../src/CommunityToolkit.WinUI.Effects.csproj | 17 ----------
components/Effects/src/Dependencies.props | 31 ------------------
components/Effects/src/MultiTarget.props | 10 ------
.../Effects/tests/Effects.Tests.projitems | 23 -------------
components/Effects/tests/Effects.Tests.shproj | 13 --------
.../samples/Assets/AttachedDropShadow.png | Bin
.../samples/Assets/Llama.jpg | Bin
.../samples/AttachedDropShadow.md | 0
.../AttachedDropShadowBasicSample.xaml | 2 +-
.../AttachedDropShadowBasicSample.xaml.cs | 2 +-
.../AttachedDropShadowResourceSample.xaml | 2 +-
.../AttachedDropShadowResourceSample.xaml.cs | 2 +-
.../AttachedDropShadowStyleSample.xaml | 2 +-
.../AttachedDropShadowStyleSample.xaml.cs | 2 +-
.../samples/AttachedShadows.md | 0
.../samples/Effects.md | 0
.../samples/Extensions.Samples.csproj | 8 +++++
.../src/Shadows/AttachedDropShadow.cs | 0
.../src/Shadows/AttachedShadowBase.cs | 15 ++++++---
.../Shadows/AttachedShadowElementContext.cs | 0
.../src/Shadows/Effects.cs | 0
.../src/Shadows/IAlphaMaskProvider.cs | 0
.../src/Shadows/IAttachedShadow.cs | 0
.../src/Shadows/TypedResourceKey.cs | 0
.../tests/AttachedDropShadowTestPage.xaml | 2 +-
.../tests/AttachedDropShadowTestPage.xaml.cs | 2 +-
.../tests/AttachedDropShadowTests.cs | 2 +-
33 files changed, 28 insertions(+), 172 deletions(-)
delete mode 100644 components/Effects/OpenSolution.bat
delete mode 100644 components/Effects/samples/Dependencies.props
delete mode 100644 components/Effects/samples/Effects.Samples.csproj
delete mode 100644 components/Effects/src/AdditionalAssemblyInfo.cs
delete mode 100644 components/Effects/src/CommunityToolkit.WinUI.Effects.csproj
delete mode 100644 components/Effects/src/Dependencies.props
delete mode 100644 components/Effects/src/MultiTarget.props
delete mode 100644 components/Effects/tests/Effects.Tests.projitems
delete mode 100644 components/Effects/tests/Effects.Tests.shproj
rename components/{Effects => Extensions}/samples/Assets/AttachedDropShadow.png (100%)
rename components/{Effects => Extensions}/samples/Assets/Llama.jpg (100%)
rename components/{Effects => Extensions}/samples/AttachedDropShadow.md (100%)
rename components/{Effects => Extensions}/samples/AttachedDropShadowBasicSample.xaml (95%)
rename components/{Effects => Extensions}/samples/AttachedDropShadowBasicSample.xaml.cs (93%)
rename components/{Effects => Extensions}/samples/AttachedDropShadowResourceSample.xaml (94%)
rename components/{Effects => Extensions}/samples/AttachedDropShadowResourceSample.xaml.cs (93%)
rename components/{Effects => Extensions}/samples/AttachedDropShadowStyleSample.xaml (96%)
rename components/{Effects => Extensions}/samples/AttachedDropShadowStyleSample.xaml.cs (93%)
rename components/{Effects => Extensions}/samples/AttachedShadows.md (100%)
rename components/{Effects => Extensions}/samples/Effects.md (100%)
rename components/{Effects => Extensions}/src/Shadows/AttachedDropShadow.cs (100%)
rename components/{Effects => Extensions}/src/Shadows/AttachedShadowBase.cs (96%)
rename components/{Effects => Extensions}/src/Shadows/AttachedShadowElementContext.cs (100%)
rename components/{Effects => Extensions}/src/Shadows/Effects.cs (100%)
rename components/{Effects => Extensions}/src/Shadows/IAlphaMaskProvider.cs (100%)
rename components/{Effects => Extensions}/src/Shadows/IAttachedShadow.cs (100%)
rename components/{Effects => Extensions}/src/Shadows/TypedResourceKey.cs (100%)
rename components/{Effects => Extensions}/tests/AttachedDropShadowTestPage.xaml (94%)
rename components/{Effects => Extensions}/tests/AttachedDropShadowTestPage.xaml.cs (92%)
rename components/{Effects => Extensions}/tests/AttachedDropShadowTests.cs (98%)
diff --git a/Directory.Build.props b/Directory.Build.props
index 2ccb9d2b..a622b455 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -6,7 +6,6 @@
true
$(RepositoryDirectory)\components\Extensions\src\CommunityToolkit.WinUI.Extensions.csproj
$(RepositoryDirectory)\components\Helpers\src\CommunityToolkit.WinUI.Helpers.csproj
- $(RepositoryDirectory)\components\Effects\src\CommunityToolkit.WinUI.Effects.csproj
$(RepositoryDirectory)\components\Behaviors\src\CommunityToolkit.WinUI.Behaviors.csproj
$(RepositoryDirectory)\components\Animations\src\CommunityToolkit.WinUI.Animations.csproj
$(RepositoryDirectory)\components\Primitives\src\CommunityToolkit.WinUI.Controls.Primitives.csproj
diff --git a/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj b/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj
index 69216741..2cd3b6bb 100644
--- a/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj
+++ b/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj
@@ -19,7 +19,6 @@
-
diff --git a/components/Effects/OpenSolution.bat b/components/Effects/OpenSolution.bat
deleted file mode 100644
index 814a56d4..00000000
--- a/components/Effects/OpenSolution.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@ECHO OFF
-
-powershell ..\..\tooling\ProjectHeads\GenerateSingleSampleHeads.ps1 -componentPath %CD% %*
\ No newline at end of file
diff --git a/components/Effects/samples/Dependencies.props b/components/Effects/samples/Dependencies.props
deleted file mode 100644
index e622e1df..00000000
--- a/components/Effects/samples/Dependencies.props
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/components/Effects/samples/Effects.Samples.csproj b/components/Effects/samples/Effects.Samples.csproj
deleted file mode 100644
index 1f236f73..00000000
--- a/components/Effects/samples/Effects.Samples.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- Effects
-
-
-
-
-
-
- PreserveNewest
-
-
-
-
-
-
diff --git a/components/Effects/src/AdditionalAssemblyInfo.cs b/components/Effects/src/AdditionalAssemblyInfo.cs
deleted file mode 100644
index 176aff82..00000000
--- a/components/Effects/src/AdditionalAssemblyInfo.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.
-
-using System.Runtime.CompilerServices;
-
-// These `InternalsVisibleTo` calls are intended to make it easier for
-// for any internal code to be testable in all the different test projects
-// used with the Labs infrastructure.
-[assembly: InternalsVisibleTo("Effects.Tests.Uwp")]
-[assembly: InternalsVisibleTo("Effects.Tests.WinAppSdk")]
-[assembly: InternalsVisibleTo("CommunityToolkit.Tests.Uwp")]
-[assembly: InternalsVisibleTo("CommunityToolkit.Tests.WinAppSdk")]
diff --git a/components/Effects/src/CommunityToolkit.WinUI.Effects.csproj b/components/Effects/src/CommunityToolkit.WinUI.Effects.csproj
deleted file mode 100644
index 97a6821e..00000000
--- a/components/Effects/src/CommunityToolkit.WinUI.Effects.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- Effects
- This package contains Effects.
- 8.0.0-beta.1
-
-
- CommunityToolkit.WinUI.EffectsRns
-
-
-
-
-
-
-
-
-
diff --git a/components/Effects/src/Dependencies.props b/components/Effects/src/Dependencies.props
deleted file mode 100644
index e622e1df..00000000
--- a/components/Effects/src/Dependencies.props
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/components/Effects/src/MultiTarget.props b/components/Effects/src/MultiTarget.props
deleted file mode 100644
index ca9bfd7b..00000000
--- a/components/Effects/src/MultiTarget.props
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- uwp;wasdk;
-
-
diff --git a/components/Effects/tests/Effects.Tests.projitems b/components/Effects/tests/Effects.Tests.projitems
deleted file mode 100644
index 8b01fbce..00000000
--- a/components/Effects/tests/Effects.Tests.projitems
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- true
- 1831A22E-6A21-48CA-B4E5-84ED04E6368F
-
-
- EffectsExperiment.Tests
-
-
-
- AttachedDropShadowTests.xaml
-
-
-
-
-
- Designer
- MSBuild:Compile
-
-
-
\ No newline at end of file
diff --git a/components/Effects/tests/Effects.Tests.shproj b/components/Effects/tests/Effects.Tests.shproj
deleted file mode 100644
index 9c2211b6..00000000
--- a/components/Effects/tests/Effects.Tests.shproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- 1831A22E-6A21-48CA-B4E5-84ED04E6368F
- 14.0
-
-
-
-
-
-
-
-
diff --git a/components/Effects/samples/Assets/AttachedDropShadow.png b/components/Extensions/samples/Assets/AttachedDropShadow.png
similarity index 100%
rename from components/Effects/samples/Assets/AttachedDropShadow.png
rename to components/Extensions/samples/Assets/AttachedDropShadow.png
diff --git a/components/Effects/samples/Assets/Llama.jpg b/components/Extensions/samples/Assets/Llama.jpg
similarity index 100%
rename from components/Effects/samples/Assets/Llama.jpg
rename to components/Extensions/samples/Assets/Llama.jpg
diff --git a/components/Effects/samples/AttachedDropShadow.md b/components/Extensions/samples/AttachedDropShadow.md
similarity index 100%
rename from components/Effects/samples/AttachedDropShadow.md
rename to components/Extensions/samples/AttachedDropShadow.md
diff --git a/components/Effects/samples/AttachedDropShadowBasicSample.xaml b/components/Extensions/samples/AttachedDropShadowBasicSample.xaml
similarity index 95%
rename from components/Effects/samples/AttachedDropShadowBasicSample.xaml
rename to components/Extensions/samples/AttachedDropShadowBasicSample.xaml
index 2cab5d49..d4372090 100644
--- a/components/Effects/samples/AttachedDropShadowBasicSample.xaml
+++ b/components/Extensions/samples/AttachedDropShadowBasicSample.xaml
@@ -1,5 +1,5 @@
-
-
-
+
+
+
+
+
+ PreserveNewest
+
+
diff --git a/components/Effects/src/Shadows/AttachedDropShadow.cs b/components/Extensions/src/Shadows/AttachedDropShadow.cs
similarity index 100%
rename from components/Effects/src/Shadows/AttachedDropShadow.cs
rename to components/Extensions/src/Shadows/AttachedDropShadow.cs
diff --git a/components/Effects/src/Shadows/AttachedShadowBase.cs b/components/Extensions/src/Shadows/AttachedShadowBase.cs
similarity index 96%
rename from components/Effects/src/Shadows/AttachedShadowBase.cs
rename to components/Extensions/src/Shadows/AttachedShadowBase.cs
index b05d2ff6..26583602 100644
--- a/components/Effects/src/Shadows/AttachedShadowBase.cs
+++ b/components/Extensions/src/Shadows/AttachedShadowBase.cs
@@ -18,7 +18,7 @@
namespace CommunityToolkit.WinUI;
///
-/// The base class for attached shadows.
+/// The base class for attached shadows. (Not supported in Uno.)
///
public abstract partial class AttachedShadowBase : DependencyObject, IAttachedShadow
{
@@ -160,7 +160,7 @@ protected internal virtual void OnElementContextInitialized(AttachedShadowElemen
protected internal virtual void OnElementContextUninitialized(AttachedShadowElementContext context)
{
context.ClearAndDisposeResources();
- ElementCompositionPreview.SetElementChildVisual(context.Element, null);
+ ElementCompositionPreview.SetElementChildVisual(context.Element, null!);
}
///
@@ -177,23 +177,29 @@ protected internal virtual void OnElementContextUninitialized(AttachedShadowElem
///
public IEnumerable EnumerateElementContexts()
{
+#if !NETSTANDARD2_0
foreach (var kvp in ShadowElementContextTable)
{
yield return kvp.Value;
}
+#else
+ // TODO: If Uno supports composition, we also need a ConditionalWeakTable polyfill...
+ return Enumerable.Empty();
+#endif
}
///
/// Sets as a child visual on
///
- /// The this operaiton will be performed on.
+ /// The this operation will be performed on.
protected virtual void SetElementChildVisual(AttachedShadowElementContext context)
{
- ElementCompositionPreview.SetElementChildVisual(context.Element, context.SpriteVisual);
+ ElementCompositionPreview.SetElementChildVisual(context.Element, context.SpriteVisual!);
}
private void CallPropertyChangedForEachElement(DependencyProperty property, object oldValue, object newValue)
{
+#if !NETSTANDARD2_0
foreach (var context in ShadowElementContextTable)
{
if (context.Value.IsInitialized)
@@ -201,6 +207,7 @@ private void CallPropertyChangedForEachElement(DependencyProperty property, obje
OnPropertyChanged(context.Value, property, oldValue, newValue);
}
}
+#endif
}
///
diff --git a/components/Effects/src/Shadows/AttachedShadowElementContext.cs b/components/Extensions/src/Shadows/AttachedShadowElementContext.cs
similarity index 100%
rename from components/Effects/src/Shadows/AttachedShadowElementContext.cs
rename to components/Extensions/src/Shadows/AttachedShadowElementContext.cs
diff --git a/components/Effects/src/Shadows/Effects.cs b/components/Extensions/src/Shadows/Effects.cs
similarity index 100%
rename from components/Effects/src/Shadows/Effects.cs
rename to components/Extensions/src/Shadows/Effects.cs
diff --git a/components/Effects/src/Shadows/IAlphaMaskProvider.cs b/components/Extensions/src/Shadows/IAlphaMaskProvider.cs
similarity index 100%
rename from components/Effects/src/Shadows/IAlphaMaskProvider.cs
rename to components/Extensions/src/Shadows/IAlphaMaskProvider.cs
diff --git a/components/Effects/src/Shadows/IAttachedShadow.cs b/components/Extensions/src/Shadows/IAttachedShadow.cs
similarity index 100%
rename from components/Effects/src/Shadows/IAttachedShadow.cs
rename to components/Extensions/src/Shadows/IAttachedShadow.cs
diff --git a/components/Effects/src/Shadows/TypedResourceKey.cs b/components/Extensions/src/Shadows/TypedResourceKey.cs
similarity index 100%
rename from components/Effects/src/Shadows/TypedResourceKey.cs
rename to components/Extensions/src/Shadows/TypedResourceKey.cs
diff --git a/components/Effects/tests/AttachedDropShadowTestPage.xaml b/components/Extensions/tests/AttachedDropShadowTestPage.xaml
similarity index 94%
rename from components/Effects/tests/AttachedDropShadowTestPage.xaml
rename to components/Extensions/tests/AttachedDropShadowTestPage.xaml
index 7c7c1f9b..d8a2d685 100644
--- a/components/Effects/tests/AttachedDropShadowTestPage.xaml
+++ b/components/Extensions/tests/AttachedDropShadowTestPage.xaml
@@ -1,5 +1,5 @@
-
/// An empty page that can be used on its own or navigated to within a Frame.
diff --git a/components/Effects/tests/AttachedDropShadowTests.cs b/components/Extensions/tests/AttachedDropShadowTests.cs
similarity index 98%
rename from components/Effects/tests/AttachedDropShadowTests.cs
rename to components/Extensions/tests/AttachedDropShadowTests.cs
index ebfa8c17..9402074b 100644
--- a/components/Effects/tests/AttachedDropShadowTests.cs
+++ b/components/Extensions/tests/AttachedDropShadowTests.cs
@@ -6,7 +6,7 @@
using CommunityToolkit.Tests;
using CommunityToolkit.WinUI;
-namespace EffectsExperiment.Tests;
+namespace ExtensionsExperiment.Tests;
[TestClass]
public partial class AttachedDropShadowTests : VisualUITestBase
From 13aff8132052dc9674fd60ee7350ff5e06f2dd80 Mon Sep 17 00:00:00 2001
From: michael-hawker <24302614+michael-hawker@users.noreply.github.com>
Date: Mon, 10 Jul 2023 15:54:29 -0700
Subject: [PATCH 2/5] Add Uno platform targets to Animation package
Make the Xaml layer the default animation layer when using Uno
---
.../src/Builders/AnimationBuilder.Default.cs | 48 +++++++++++++++++
.../Builders/AnimationBuilder.KeyFrames.cs | 51 +++++++++++++++++--
...KeyFrameAnimationBuilder{T}.Composition.cs | 4 ++
.../TimedKeyFrameAnimationBuilder{T}.cs | 5 ++
components/Animations/src/MultiTarget.props | 2 +-
.../Animations/src/Xaml/Abstract/Animation.cs | 2 +-
.../CustomAnimation{TValue,TKeyFrame}.cs | 6 +++
.../Abstract/KeyFrame{TValue,TKeyFrame}.cs | 15 +++++-
.../src/Xaml/Activities/Activity.cs | 2 +-
.../src/Xaml/AnimationDictionary.cs | 2 +-
.../Animations/src/Xaml/AnimationSet.cs | 10 ++++
11 files changed, 137 insertions(+), 10 deletions(-)
diff --git a/components/Animations/src/Builders/AnimationBuilder.Default.cs b/components/Animations/src/Builders/AnimationBuilder.Default.cs
index 75a5112c..4f43e88e 100644
--- a/components/Animations/src/Builders/AnimationBuilder.Default.cs
+++ b/components/Animations/src/Builders/AnimationBuilder.Default.cs
@@ -92,7 +92,11 @@ public AnimationBuilder Opacity(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -128,7 +132,11 @@ public AnimationBuilder Translation(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -162,7 +170,11 @@ public AnimationBuilder Translation(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -297,7 +309,11 @@ public AnimationBuilder Scale(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -337,7 +353,11 @@ public AnimationBuilder Scale(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -371,7 +391,11 @@ public AnimationBuilder Scale(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -432,7 +456,11 @@ public AnimationBuilder CenterPoint(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -466,7 +494,11 @@ public AnimationBuilder CenterPoint(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -525,7 +557,11 @@ public AnimationBuilder Rotation(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -562,7 +598,11 @@ public AnimationBuilder RotationInDegrees(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -800,7 +840,11 @@ public AnimationBuilder Size(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -834,7 +878,11 @@ public AnimationBuilder Size(
RepeatOption? repeat = null,
EasingType easingType = DefaultEasingType,
EasingMode easingMode = DefaultEasingMode,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
diff --git a/components/Animations/src/Builders/AnimationBuilder.KeyFrames.cs b/components/Animations/src/Builders/AnimationBuilder.KeyFrames.cs
index 2e91f9f2..6b86428a 100644
--- a/components/Animations/src/Builders/AnimationBuilder.KeyFrames.cs
+++ b/components/Animations/src/Builders/AnimationBuilder.KeyFrames.cs
@@ -41,7 +41,12 @@ public IPropertyAnimationBuilder AnchorPoint()
///
/// The target framework layer to animate.
/// An instance to configure the animation.
- public IPropertyAnimationBuilder Opacity(FrameworkLayer layer = FrameworkLayer.Composition)
+ public IPropertyAnimationBuilder Opacity(
+#if !HAS_UNO
+ FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
return new PropertyAnimationBuilder(this, nameof(Visual.Opacity), layer);
}
@@ -52,7 +57,12 @@ public IPropertyAnimationBuilder Opacity(FrameworkLayer layer = Framewor
/// The target translation axis to animate.
/// The target framework layer to animate.
/// An instance to configure the animation.
- public IPropertyAnimationBuilder Translation(Axis axis, FrameworkLayer layer = FrameworkLayer.Composition)
+ public IPropertyAnimationBuilder Translation(Axis axis,
+#if !HAS_UNO
+ FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -99,7 +109,12 @@ public IPropertyAnimationBuilder Offset()
/// The target scale axis to animate.
/// The target framework layer to animate.
/// An instance to configure the animation.
- public IPropertyAnimationBuilder Scale(Axis axis, FrameworkLayer layer = FrameworkLayer.Composition)
+ public IPropertyAnimationBuilder Scale(Axis axis,
+#if !HAS_UNO
+ FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -125,7 +140,12 @@ public IPropertyAnimationBuilder Scale()
/// The target scale axis to animate.
/// The target framework layer to animate.
/// An instance to configure the animation.
- public IPropertyAnimationBuilder CenterPoint(Axis axis, FrameworkLayer layer = FrameworkLayer.Composition)
+ public IPropertyAnimationBuilder CenterPoint(Axis axis,
+#if !HAS_UNO
+ FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -160,7 +180,12 @@ public IPropertyAnimationBuilder Rotation()
///
/// The target framework layer to animate.
/// An instance to configure the animation.
- public IPropertyAnimationBuilder RotationInDegrees(FrameworkLayer layer = FrameworkLayer.Composition)
+ public IPropertyAnimationBuilder RotationInDegrees(
+#if !HAS_UNO
+ FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
{
if (layer == FrameworkLayer.Composition)
{
@@ -246,7 +271,11 @@ public AnimationBuilder NormalizedKeyFrames(
TimeSpan? duration = null,
RepeatOption? repeatOption = null,
AnimationDelayBehavior? delayBehavior = null,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
where T : unmanaged
{
if (layer == FrameworkLayer.Composition)
@@ -300,7 +329,11 @@ public AnimationBuilder NormalizedKeyFrames(
TimeSpan? duration = null,
RepeatOption? repeatOption = null,
AnimationDelayBehavior? delayBehavior = null,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
where T : unmanaged
{
if (layer == FrameworkLayer.Composition)
@@ -349,7 +382,11 @@ public AnimationBuilder TimedKeyFrames(
TimeSpan? delay = null,
RepeatOption? repeat = null,
AnimationDelayBehavior? delayBehavior = null,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
where T : unmanaged
{
if (layer == FrameworkLayer.Composition)
@@ -396,7 +433,11 @@ public AnimationBuilder TimedKeyFrames(
TimeSpan? delay = null,
RepeatOption? repeatOption = null,
AnimationDelayBehavior? delayBehavior = null,
+#if !HAS_UNO
FrameworkLayer layer = FrameworkLayer.Composition)
+#else
+ FrameworkLayer layer = FrameworkLayer.Xaml)
+#endif
where T : unmanaged
{
if (layer == FrameworkLayer.Composition)
diff --git a/components/Animations/src/Builders/TimedKeyFrameAnimationBuilder{T}.Composition.cs b/components/Animations/src/Builders/TimedKeyFrameAnimationBuilder{T}.Composition.cs
index 7c476436..b517f6a5 100644
--- a/components/Animations/src/Builders/TimedKeyFrameAnimationBuilder{T}.Composition.cs
+++ b/components/Animations/src/Builders/TimedKeyFrameAnimationBuilder{T}.Composition.cs
@@ -58,7 +58,11 @@ public CompositionAnimation GetAnimation(CompositionObject targetHint, out Compo
// We can retrieve the total duration from the last timed keyframe, and then set
// this as the target duration and use it to normalize the keyframe progresses.
ArraySegment keyFrames = this.keyFrames.GetArraySegment();
+#if !NETSTANDARD2_0
TimeSpan duration = keyFrames[keyFrames.Count - 1].GetTimedProgress(default);
+#else
+ TimeSpan duration = keyFrames.Array[keyFrames.Count - 1].GetTimedProgress(default);
+#endif
return NormalizedKeyFrameAnimationBuilder.GetAnimation(
targetHint,
diff --git a/components/Animations/src/Builders/TimedKeyFrameAnimationBuilder{T}.cs b/components/Animations/src/Builders/TimedKeyFrameAnimationBuilder{T}.cs
index 7d5b2d54..2936cd46 100644
--- a/components/Animations/src/Builders/TimedKeyFrameAnimationBuilder{T}.cs
+++ b/components/Animations/src/Builders/TimedKeyFrameAnimationBuilder{T}.cs
@@ -172,7 +172,12 @@ public bool TryInsertExpressionKeyFrame(KeyFrameAnimation animation, TimeSpan du
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public float GetNormalizedProgress(TimeSpan duration)
{
+#if !NETSTANDARD2_0
return (float)Math.Clamp(this.progress.TotalMilliseconds / duration.TotalMilliseconds, 0, 1);
+#else
+ var result = this.progress.TotalMilliseconds / duration.TotalMilliseconds;
+ return (float)Math.Max(Math.Min(result, 1), 0);
+#endif
}
///
diff --git a/components/Animations/src/MultiTarget.props b/components/Animations/src/MultiTarget.props
index 18f6c7c9..c780abff 100644
--- a/components/Animations/src/MultiTarget.props
+++ b/components/Animations/src/MultiTarget.props
@@ -4,6 +4,6 @@
MultiTarget is a custom property that indicates which target a project is designed to be built for / run on.
Used to create project references, generate solution files, enable/disable TargetFrameworks, and build nuget packages.
-->
- uwp;wasdk;
+ uwp;wasdk;wpf;wasm;linuxgtk;macos;ios;android;
diff --git a/components/Animations/src/Xaml/Abstract/Animation.cs b/components/Animations/src/Xaml/Abstract/Animation.cs
index f4c0d8dc..fd2d25b1 100644
--- a/components/Animations/src/Xaml/Abstract/Animation.cs
+++ b/components/Animations/src/Xaml/Abstract/Animation.cs
@@ -13,7 +13,7 @@ namespace CommunityToolkit.WinUI.Animations;
///
/// A base model representing an animation that can be used in XAML.
///
-public abstract class Animation : DependencyObject, ITimeline
+public abstract partial class Animation : DependencyObject, ITimeline
{
///
/// Gets or sets the optional initial delay for the animation.
diff --git a/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs b/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs
index 92d6fa0d..ef1bef0b 100644
--- a/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs
+++ b/components/Animations/src/Xaml/Abstract/CustomAnimation{TValue,TKeyFrame}.cs
@@ -23,9 +23,15 @@ public abstract class CustomAnimation : ImplicitAnimation.
///
public FrameworkLayer Layer { get; set; }
+#else
+ /// The default value is .
+ ///
+ public FrameworkLayer Layer { get; set; } = FrameworkLayer.Xaml;
+#endif
///
protected override string ExplicitTarget => Target!;
diff --git a/components/Animations/src/Xaml/Abstract/KeyFrame{TValue,TKeyFrame}.cs b/components/Animations/src/Xaml/Abstract/KeyFrame{TValue,TKeyFrame}.cs
index 8a281a52..ea5627ce 100644
--- a/components/Animations/src/Xaml/Abstract/KeyFrame{TValue,TKeyFrame}.cs
+++ b/components/Animations/src/Xaml/Abstract/KeyFrame{TValue,TKeyFrame}.cs
@@ -6,6 +6,15 @@
namespace CommunityToolkit.WinUI.Animations;
+#if HAS_UNO
+///
+/// A base model representing a key frame for Uno Platform compatibility
+///
+public abstract partial class KeyFrame : DependencyObject
+{
+}
+#endif
+
///
/// A base model representing a typed keyframe that can be used in XAML.
///
@@ -14,7 +23,11 @@ namespace CommunityToolkit.WinUI.Animations;
/// This can differ from to facilitate XAML parsing.
///
/// The actual type of keyframe values in use.
-public abstract class KeyFrame : DependencyObject, IKeyFrame
+#if !HAS_UNO
+public abstract partial class KeyFrame : DependencyObject, IKeyFrame
+#else
+public abstract partial class KeyFrame : KeyFrame, IKeyFrame
+#endif
{
///
/// Gets or sets the key time for the current keyframe. This is a normalized
diff --git a/components/Animations/src/Xaml/Activities/Activity.cs b/components/Animations/src/Xaml/Activities/Activity.cs
index 100598a2..cee44404 100644
--- a/components/Animations/src/Xaml/Activities/Activity.cs
+++ b/components/Animations/src/Xaml/Activities/Activity.cs
@@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Animations;
///
/// Base class to use when creating activities which accept a .
///
-public abstract class Activity : DependencyObject, IActivity
+public abstract partial class Activity : DependencyObject, IActivity
{
///
/// Gets or sets the to wait before running the activity.
diff --git a/components/Animations/src/Xaml/AnimationDictionary.cs b/components/Animations/src/Xaml/AnimationDictionary.cs
index 6a2b728c..4640a920 100644
--- a/components/Animations/src/Xaml/AnimationDictionary.cs
+++ b/components/Animations/src/Xaml/AnimationDictionary.cs
@@ -9,7 +9,7 @@ namespace CommunityToolkit.WinUI.Animations;
///
/// A collection of animations that can be defined from XAML.
///
-public sealed class AnimationDictionary : DependencyObject, IList
+public sealed partial class AnimationDictionary : DependencyObject, IList
{
///
/// The underlying list of animations.
diff --git a/components/Animations/src/Xaml/AnimationSet.cs b/components/Animations/src/Xaml/AnimationSet.cs
index f9f894a0..0c1035ed 100644
--- a/components/Animations/src/Xaml/AnimationSet.cs
+++ b/components/Animations/src/Xaml/AnimationSet.cs
@@ -92,7 +92,17 @@ public Task StartAsync(UIElement element)
CancellationTokenSource cancellationTokenSource = new();
+#if !NETSTANDARD2_0
this.cancellationTokenMap.AddOrUpdate(element, cancellationTokenSource);
+#else
+ // If we have a token, remove it first, before adding new one.
+ if (this.cancellationTokenMap.TryGetValue(element, out _))
+ {
+ this.cancellationTokenMap.Remove(element);
+ }
+
+ this.cancellationTokenMap.Add(element, cancellationTokenSource);
+#endif
return StartAsync(element, cancellationTokenSource.Token);
}
From acd2d46474cc79008bf38c2f26faf0438272187f Mon Sep 17 00:00:00 2001
From: michael-hawker <24302614+michael-hawker@users.noreply.github.com>
Date: Mon, 10 Jul 2023 16:15:24 -0700
Subject: [PATCH 3/5] Target Uno for the Behaviors.Animations package
Didn't see it working on Uno, but not sure if related to #119 or issue with caching or something...
Will have to add another sample and see after?
---
components/Behaviors.Animations/src/MultiTarget.props | 4 ++--
components/Behaviors.Animations/src/StartAnimationAction.cs | 2 +-
components/Behaviors.Animations/src/StopAnimationAction.cs | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/components/Behaviors.Animations/src/MultiTarget.props b/components/Behaviors.Animations/src/MultiTarget.props
index 6a460034..c780abff 100644
--- a/components/Behaviors.Animations/src/MultiTarget.props
+++ b/components/Behaviors.Animations/src/MultiTarget.props
@@ -4,6 +4,6 @@
MultiTarget is a custom property that indicates which target a project is designed to be built for / run on.
Used to create project references, generate solution files, enable/disable TargetFrameworks, and build nuget packages.
-->
- uwp;wasdk;
+ uwp;wasdk;wpf;wasm;linuxgtk;macos;ios;android;
-
\ No newline at end of file
+
diff --git a/components/Behaviors.Animations/src/StartAnimationAction.cs b/components/Behaviors.Animations/src/StartAnimationAction.cs
index 890326fc..420167de 100644
--- a/components/Behaviors.Animations/src/StartAnimationAction.cs
+++ b/components/Behaviors.Animations/src/StartAnimationAction.cs
@@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Behaviors;
///
/// An implementation that can trigger a target instance.
///
-public sealed class StartAnimationAction : DependencyObject, IAction
+public sealed partial class StartAnimationAction : DependencyObject, IAction
{
///
/// Gets or sets the linked instance to invoke.
diff --git a/components/Behaviors.Animations/src/StopAnimationAction.cs b/components/Behaviors.Animations/src/StopAnimationAction.cs
index 07448c2a..cd20cb40 100644
--- a/components/Behaviors.Animations/src/StopAnimationAction.cs
+++ b/components/Behaviors.Animations/src/StopAnimationAction.cs
@@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Behaviors;
///
/// An implementation that can stop a target instance.
///
-public sealed class StopAnimationAction : DependencyObject, IAction
+public sealed partial class StopAnimationAction : DependencyObject, IAction
{
///
/// Gets or sets the linked instance to stop.
From 4755d04e90eb2d0fc289906b4fb58ca316278be5 Mon Sep 17 00:00:00 2001
From: michael-hawker <24302614+michael-hawker@users.noreply.github.com>
Date: Mon, 10 Jul 2023 16:42:57 -0700
Subject: [PATCH 4/5] Merge Behaviors.Animations component back into Behaviors
---
.../CommunityToolkit.WinUI.Animations.csproj | 2 +-
.../Behaviors.Animations/OpenSolution.bat | 3 --
.../Behaviors.Animations.Samples.csproj | 16 ---------
.../samples/Dependencies.props | 31 ------------------
.../src/AdditionalAssemblyInfo.cs | 13 --------
...yToolkit.WinUI.Behaviors.Animations.csproj | 17 ----------
.../src/Dependencies.props | 31 ------------------
.../src/MultiTarget.props | 9 -----
.../Behaviors.Animations.Tests.projitems | 11 -------
.../tests/Behaviors.Animations.Tests.shproj | 13 --------
.../samples/Assets/AnimationSet.png | Bin
.../samples/Assets/ToolkitIcon.png | Bin
.../samples/Behaviors.Animations.md | 0
.../samples/Behaviors.Samples.csproj | 8 +++++
.../samples/InvokeActionsSample.xaml | 4 +--
.../samples/InvokeActionsSample.xaml.cs | 2 +-
.../samples/StartAnimationActivitySample.xaml | 4 +--
.../StartAnimationActivitySample.xaml.cs | 2 +-
.../AnimationCompletedTriggerBehavior.cs | 0
.../AnimationStartedTriggerBehavior.cs | 0
.../src/Animations}/InvokeActionsActivity.cs | 0
.../src/Animations}/StartAnimationAction.cs | 0
.../src/Animations}/StopAnimationAction.cs | 0
.../CommunityToolkit.WinUI.Behaviors.csproj | 1 +
24 files changed, 16 insertions(+), 151 deletions(-)
delete mode 100644 components/Behaviors.Animations/OpenSolution.bat
delete mode 100644 components/Behaviors.Animations/samples/Behaviors.Animations.Samples.csproj
delete mode 100644 components/Behaviors.Animations/samples/Dependencies.props
delete mode 100644 components/Behaviors.Animations/src/AdditionalAssemblyInfo.cs
delete mode 100644 components/Behaviors.Animations/src/CommunityToolkit.WinUI.Behaviors.Animations.csproj
delete mode 100644 components/Behaviors.Animations/src/Dependencies.props
delete mode 100644 components/Behaviors.Animations/src/MultiTarget.props
delete mode 100644 components/Behaviors.Animations/tests/Behaviors.Animations.Tests.projitems
delete mode 100644 components/Behaviors.Animations/tests/Behaviors.Animations.Tests.shproj
rename components/{Behaviors.Animations => Behaviors}/samples/Assets/AnimationSet.png (100%)
rename components/{Behaviors.Animations => Behaviors}/samples/Assets/ToolkitIcon.png (100%)
rename components/{Behaviors.Animations => Behaviors}/samples/Behaviors.Animations.md (100%)
rename components/{Behaviors.Animations => Behaviors}/samples/InvokeActionsSample.xaml (95%)
rename components/{Behaviors.Animations => Behaviors}/samples/InvokeActionsSample.xaml.cs (92%)
rename components/{Behaviors.Animations => Behaviors}/samples/StartAnimationActivitySample.xaml (95%)
rename components/{Behaviors.Animations => Behaviors}/samples/StartAnimationActivitySample.xaml.cs (92%)
rename components/{Behaviors.Animations/src => Behaviors/src/Animations}/AnimationCompletedTriggerBehavior.cs (100%)
rename components/{Behaviors.Animations/src => Behaviors/src/Animations}/AnimationStartedTriggerBehavior.cs (100%)
rename components/{Behaviors.Animations/src => Behaviors/src/Animations}/InvokeActionsActivity.cs (100%)
rename components/{Behaviors.Animations/src => Behaviors/src/Animations}/StartAnimationAction.cs (100%)
rename components/{Behaviors.Animations/src => Behaviors/src/Animations}/StopAnimationAction.cs (100%)
diff --git a/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj b/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj
index 2cd3b6bb..b6f2cff3 100644
--- a/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj
+++ b/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj
@@ -10,7 +10,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/components/Behaviors.Animations/OpenSolution.bat b/components/Behaviors.Animations/OpenSolution.bat
deleted file mode 100644
index 814a56d4..00000000
--- a/components/Behaviors.Animations/OpenSolution.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@ECHO OFF
-
-powershell ..\..\tooling\ProjectHeads\GenerateSingleSampleHeads.ps1 -componentPath %CD% %*
\ No newline at end of file
diff --git a/components/Behaviors.Animations/samples/Behaviors.Animations.Samples.csproj b/components/Behaviors.Animations/samples/Behaviors.Animations.Samples.csproj
deleted file mode 100644
index a54b3c1d..00000000
--- a/components/Behaviors.Animations/samples/Behaviors.Animations.Samples.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- Behaviors.Animations
-
-
-
-
-
-
-
-
-
- Always
-
-
-
diff --git a/components/Behaviors.Animations/samples/Dependencies.props b/components/Behaviors.Animations/samples/Dependencies.props
deleted file mode 100644
index e622e1df..00000000
--- a/components/Behaviors.Animations/samples/Dependencies.props
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/components/Behaviors.Animations/src/AdditionalAssemblyInfo.cs b/components/Behaviors.Animations/src/AdditionalAssemblyInfo.cs
deleted file mode 100644
index 23a99ddd..00000000
--- a/components/Behaviors.Animations/src/AdditionalAssemblyInfo.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.
-
-using System.Runtime.CompilerServices;
-
-// These `InternalsVisibleTo` calls are intended to make it easier for
-// for any internal code to be testable in all the different test projects
-// used with the Labs infrastructure.
-[assembly: InternalsVisibleTo("Behaviors.Animations.Tests.Uwp")]
-[assembly: InternalsVisibleTo("Behaviors.Animations.Tests.WinAppSdk")]
-[assembly: InternalsVisibleTo("CommunityToolkit.Tests.Uwp")]
-[assembly: InternalsVisibleTo("CommunityToolkit.Tests.WinAppSdk")]
diff --git a/components/Behaviors.Animations/src/CommunityToolkit.WinUI.Behaviors.Animations.csproj b/components/Behaviors.Animations/src/CommunityToolkit.WinUI.Behaviors.Animations.csproj
deleted file mode 100644
index 34c63b7b..00000000
--- a/components/Behaviors.Animations/src/CommunityToolkit.WinUI.Behaviors.Animations.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- Behaviors.Animations
- This package contains Behaviors.Animations.
- 8.0.0-beta.1
-
-
- CommunityToolkit.WinUI.Behaviors.AnimationsRns
-
-
-
-
-
-
-
-
-
diff --git a/components/Behaviors.Animations/src/Dependencies.props b/components/Behaviors.Animations/src/Dependencies.props
deleted file mode 100644
index 3f06d427..00000000
--- a/components/Behaviors.Animations/src/Dependencies.props
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/components/Behaviors.Animations/src/MultiTarget.props b/components/Behaviors.Animations/src/MultiTarget.props
deleted file mode 100644
index c780abff..00000000
--- a/components/Behaviors.Animations/src/MultiTarget.props
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
- uwp;wasdk;wpf;wasm;linuxgtk;macos;ios;android;
-
-
diff --git a/components/Behaviors.Animations/tests/Behaviors.Animations.Tests.projitems b/components/Behaviors.Animations/tests/Behaviors.Animations.Tests.projitems
deleted file mode 100644
index 3a8268fb..00000000
--- a/components/Behaviors.Animations/tests/Behaviors.Animations.Tests.projitems
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- true
- DA850559-344C-4658-A17D-5A0EDF83BBBD
-
-
- Behaviors.AnimationsExperiment.Tests
-
-
\ No newline at end of file
diff --git a/components/Behaviors.Animations/tests/Behaviors.Animations.Tests.shproj b/components/Behaviors.Animations/tests/Behaviors.Animations.Tests.shproj
deleted file mode 100644
index 46152ef1..00000000
--- a/components/Behaviors.Animations/tests/Behaviors.Animations.Tests.shproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- DA850559-344C-4658-A17D-5A0EDF83BBBD
- 14.0
-
-
-
-
-
-
-
-
diff --git a/components/Behaviors.Animations/samples/Assets/AnimationSet.png b/components/Behaviors/samples/Assets/AnimationSet.png
similarity index 100%
rename from components/Behaviors.Animations/samples/Assets/AnimationSet.png
rename to components/Behaviors/samples/Assets/AnimationSet.png
diff --git a/components/Behaviors.Animations/samples/Assets/ToolkitIcon.png b/components/Behaviors/samples/Assets/ToolkitIcon.png
similarity index 100%
rename from components/Behaviors.Animations/samples/Assets/ToolkitIcon.png
rename to components/Behaviors/samples/Assets/ToolkitIcon.png
diff --git a/components/Behaviors.Animations/samples/Behaviors.Animations.md b/components/Behaviors/samples/Behaviors.Animations.md
similarity index 100%
rename from components/Behaviors.Animations/samples/Behaviors.Animations.md
rename to components/Behaviors/samples/Behaviors.Animations.md
diff --git a/components/Behaviors/samples/Behaviors.Samples.csproj b/components/Behaviors/samples/Behaviors.Samples.csproj
index 95f546a6..8b835c2b 100644
--- a/components/Behaviors/samples/Behaviors.Samples.csproj
+++ b/components/Behaviors/samples/Behaviors.Samples.csproj
@@ -5,4 +5,12 @@
+
+
+
+
+
+ Always
+
+
diff --git a/components/Behaviors.Animations/samples/InvokeActionsSample.xaml b/components/Behaviors/samples/InvokeActionsSample.xaml
similarity index 95%
rename from components/Behaviors.Animations/samples/InvokeActionsSample.xaml
rename to components/Behaviors/samples/InvokeActionsSample.xaml
index 423e4044..ac9cc08f 100644
--- a/components/Behaviors.Animations/samples/InvokeActionsSample.xaml
+++ b/components/Behaviors/samples/InvokeActionsSample.xaml
@@ -1,5 +1,5 @@
-
diff --git a/components/Behaviors.Animations/samples/InvokeActionsSample.xaml.cs b/components/Behaviors/samples/InvokeActionsSample.xaml.cs
similarity index 92%
rename from components/Behaviors.Animations/samples/InvokeActionsSample.xaml.cs
rename to components/Behaviors/samples/InvokeActionsSample.xaml.cs
index a4a1cdad..319766e3 100644
--- a/components/Behaviors.Animations/samples/InvokeActionsSample.xaml.cs
+++ b/components/Behaviors/samples/InvokeActionsSample.xaml.cs
@@ -4,7 +4,7 @@
using CommunityToolkit.WinUI.Animations;
-namespace Behaviors.AnimationsExperiment.Samples;
+namespace BehaviorsExperiment.Samples;
[ToolkitSample(id: nameof(InvokeActionsActivitySample), "InvokeActionsActivity", description: $"A sample for showing how to create and use a {nameof(StartAnimationActivity)} behavior.")]
public sealed partial class InvokeActionsActivitySample : Page
diff --git a/components/Behaviors.Animations/samples/StartAnimationActivitySample.xaml b/components/Behaviors/samples/StartAnimationActivitySample.xaml
similarity index 95%
rename from components/Behaviors.Animations/samples/StartAnimationActivitySample.xaml
rename to components/Behaviors/samples/StartAnimationActivitySample.xaml
index 5659c6ae..f4312e56 100644
--- a/components/Behaviors.Animations/samples/StartAnimationActivitySample.xaml
+++ b/components/Behaviors/samples/StartAnimationActivitySample.xaml
@@ -1,5 +1,5 @@
-
diff --git a/components/Behaviors.Animations/samples/StartAnimationActivitySample.xaml.cs b/components/Behaviors/samples/StartAnimationActivitySample.xaml.cs
similarity index 92%
rename from components/Behaviors.Animations/samples/StartAnimationActivitySample.xaml.cs
rename to components/Behaviors/samples/StartAnimationActivitySample.xaml.cs
index ddd4d809..04f35292 100644
--- a/components/Behaviors.Animations/samples/StartAnimationActivitySample.xaml.cs
+++ b/components/Behaviors/samples/StartAnimationActivitySample.xaml.cs
@@ -4,7 +4,7 @@
using CommunityToolkit.WinUI.Animations;
-namespace Behaviors.AnimationsExperiment.Samples;
+namespace BehaviorsExperiment.Samples;
[ToolkitSample(id: nameof(StartAnimationActivitySample), "StartAnimationActivity", description: $"A sample for showing how to create and use a {nameof(InvokeActionsActivity)} behavior.")]
public sealed partial class StartAnimationActivitySample : Page
diff --git a/components/Behaviors.Animations/src/AnimationCompletedTriggerBehavior.cs b/components/Behaviors/src/Animations/AnimationCompletedTriggerBehavior.cs
similarity index 100%
rename from components/Behaviors.Animations/src/AnimationCompletedTriggerBehavior.cs
rename to components/Behaviors/src/Animations/AnimationCompletedTriggerBehavior.cs
diff --git a/components/Behaviors.Animations/src/AnimationStartedTriggerBehavior.cs b/components/Behaviors/src/Animations/AnimationStartedTriggerBehavior.cs
similarity index 100%
rename from components/Behaviors.Animations/src/AnimationStartedTriggerBehavior.cs
rename to components/Behaviors/src/Animations/AnimationStartedTriggerBehavior.cs
diff --git a/components/Behaviors.Animations/src/InvokeActionsActivity.cs b/components/Behaviors/src/Animations/InvokeActionsActivity.cs
similarity index 100%
rename from components/Behaviors.Animations/src/InvokeActionsActivity.cs
rename to components/Behaviors/src/Animations/InvokeActionsActivity.cs
diff --git a/components/Behaviors.Animations/src/StartAnimationAction.cs b/components/Behaviors/src/Animations/StartAnimationAction.cs
similarity index 100%
rename from components/Behaviors.Animations/src/StartAnimationAction.cs
rename to components/Behaviors/src/Animations/StartAnimationAction.cs
diff --git a/components/Behaviors.Animations/src/StopAnimationAction.cs b/components/Behaviors/src/Animations/StopAnimationAction.cs
similarity index 100%
rename from components/Behaviors.Animations/src/StopAnimationAction.cs
rename to components/Behaviors/src/Animations/StopAnimationAction.cs
diff --git a/components/Behaviors/src/CommunityToolkit.WinUI.Behaviors.csproj b/components/Behaviors/src/CommunityToolkit.WinUI.Behaviors.csproj
index c5d35777..8f516f9c 100644
--- a/components/Behaviors/src/CommunityToolkit.WinUI.Behaviors.csproj
+++ b/components/Behaviors/src/CommunityToolkit.WinUI.Behaviors.csproj
@@ -12,6 +12,7 @@
+
From 24985f77d35eb06cc7b7b6857b3781969105b27c Mon Sep 17 00:00:00 2001
From: michael-hawker <24302614+michael-hawker@users.noreply.github.com>
Date: Mon, 10 Jul 2023 23:54:09 -0700
Subject: [PATCH 5/5] Bump version numbers of Animation, Behaviors, and
Extensions packages
---
.../Animations/src/CommunityToolkit.WinUI.Animations.csproj | 2 +-
.../Behaviors/src/CommunityToolkit.WinUI.Behaviors.csproj | 2 +-
.../Extensions/src/CommunityToolkit.WinUI.Extensions.csproj | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj b/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj
index b6f2cff3..196bf0ef 100644
--- a/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj
+++ b/components/Animations/src/CommunityToolkit.WinUI.Animations.csproj
@@ -2,7 +2,7 @@
Animations
This package contains Animations.
- 8.0.0-beta.1
+ 8.0.0-beta.2
CommunityToolkit.WinUI.AnimationsRns
diff --git a/components/Behaviors/src/CommunityToolkit.WinUI.Behaviors.csproj b/components/Behaviors/src/CommunityToolkit.WinUI.Behaviors.csproj
index 8f516f9c..930be82d 100644
--- a/components/Behaviors/src/CommunityToolkit.WinUI.Behaviors.csproj
+++ b/components/Behaviors/src/CommunityToolkit.WinUI.Behaviors.csproj
@@ -2,7 +2,7 @@
Behaviors
This package contains Behaviors.
- 8.0.0-beta.1
+ 8.0.0-beta.2
CommunityToolkit.WinUI.BehaviorsRns
diff --git a/components/Extensions/src/CommunityToolkit.WinUI.Extensions.csproj b/components/Extensions/src/CommunityToolkit.WinUI.Extensions.csproj
index b4bffbc3..dceba6eb 100644
--- a/components/Extensions/src/CommunityToolkit.WinUI.Extensions.csproj
+++ b/components/Extensions/src/CommunityToolkit.WinUI.Extensions.csproj
@@ -2,7 +2,7 @@
Extensions
This package contains Extensions.
- 8.0.0-beta.1
+ 8.0.0-beta.2
CommunityToolkit.WinUI.ExtensionsRns