-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into niels9001/segmented-sample
- Loading branch information
Showing
47 changed files
with
316 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ jobs: | |
- name: Restore dotnet tools | ||
run: dotnet tool restore | ||
|
||
# Pinning Manifest for 1.13 version of Uno.Check at the moment to unblock build, see https://github.com/CommunityToolkit/Windows/pull/201 | ||
# Pinning Manifest for 1.18 version of Uno.Check at the moment to unblock build, see https://github.com/CommunityToolkit/Windows/pull/320 | ||
- name: Run Uno Check to Install Dependencies | ||
run: > | ||
dotnet tool run uno-check | ||
|
@@ -119,7 +119,7 @@ jobs: | |
--skip androidemulator | ||
--skip vswinworkloads | ||
--verbose | ||
--manifest https://raw.githubusercontent.com/unoplatform/uno.check/c3b289d7bb16a2a2df7f7f7f848d76fe1e74036d/manifests/uno.ui.manifest.json | ||
--manifest https://raw.githubusercontent.com/unoplatform/uno.check/1660eba219684491362704c75153b40ce6ef7a35/manifests/uno.ui.manifest.json | ||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// 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. | ||
|
||
#if WINUI2 | ||
using Windows.UI.Composition; | ||
using Windows.UI.Xaml.Hosting; | ||
#elif WINUI3 | ||
using Microsoft.UI.Composition; | ||
using Microsoft.UI.Xaml.Hosting; | ||
#endif | ||
|
||
using System.Numerics; | ||
using CommunityToolkit.Tests; | ||
using CommunityToolkit.Tooling.TestGen; | ||
using CommunityToolkit.WinUI.Animations.Expressions; | ||
|
||
namespace AnimationsExperiment.Tests; | ||
|
||
[TestClass] | ||
[TestCategory(nameof(Test_ExpressionFunctions))] | ||
public partial class Test_ExpressionFunctions : VisualUITestBase | ||
{ | ||
[UIThreadTestMethod] | ||
public void ColorLerpRgb(Grid rootGrid) | ||
{ | ||
// See https://github.com/CommunityToolkit/Windows/issues/303 | ||
var compositor = ElementCompositionPreview.GetElementVisual(rootGrid).Compositor; | ||
var brush = compositor.CreateColorBrush(); | ||
var temp = ExpressionFunctions.ColorRgb(255f, 255f, 0f, 0f); | ||
var color = ExpressionFunctions.ColorLerpRgb(temp, temp, 0.5f); | ||
|
||
brush.StartAnimation("Color", color); | ||
|
||
var visual = compositor.CreateSpriteVisual(); | ||
visual.Brush = brush; | ||
visual.RelativeSizeAdjustment = Vector2.One; | ||
|
||
ElementCompositionPreview.SetElementChildVisual(rootGrid, visual); | ||
} | ||
|
||
[UIThreadTestMethod] | ||
public void ColorLerpHsl(Grid rootGrid) | ||
{ | ||
// See https://github.com/CommunityToolkit/Windows/issues/303 | ||
var compositor = ElementCompositionPreview.GetElementVisual(rootGrid).Compositor; | ||
var brush = compositor.CreateColorBrush(); | ||
var temp = ExpressionFunctions.ColorHsl(255f, 255f, 0f); | ||
var color = ExpressionFunctions.ColorLerpHsl(temp, temp, 0.5f); | ||
|
||
brush.StartAnimation("Color", color); | ||
|
||
var visual = compositor.CreateSpriteVisual(); | ||
visual.Brush = brush; | ||
visual.RelativeSizeAdjustment = Vector2.One; | ||
|
||
ElementCompositionPreview.SetElementChildVisual(rootGrid, visual); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.