Skip to content

Commit 1856a7c

Browse files
niels9001Arlodotexe
authored andcommitted
Fix for the CI
1 parent cafd02a commit 1856a7c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

components/LayoutTransformControl/src/LayoutTransformControl.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44
using System.Diagnostics.CodeAnalysis;
5-
#if WINAPPSDK
6-
using Microsoft.UI.Xaml.Media;
7-
#else
8-
using Windows.UI.Xaml.Media;
9-
#endif
105

116
namespace CommunityToolkit.WinUI.Controls;
127

@@ -57,7 +52,6 @@ public partial class LayoutTransformControl : Control
5752
/// </summary>
5853
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
5954
#pragma warning disable CS8619 //
60-
#pragma warning disable CS1061 //
6155
public LayoutTransformControl()
6256
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
6357
{
@@ -162,7 +156,11 @@ private Matrix GetTransformMatrix(Transform transform)
162156

163157
if (transformGroup != null)
164158
{
159+
#if HAS_UNO
160+
var groupMatrix = Windows.UI.Xaml.Media.Matrix.Identity;
161+
#else
165162
var groupMatrix = Matrix.Identity;
163+
#endif
166164

167165
foreach (var child in transformGroup.Children)
168166
{
@@ -212,7 +210,11 @@ private Matrix GetTransformMatrix(Transform transform)
212210
}
213211

214212
// Fall back to no-op transformation
213+
#if HAS_UNO
214+
return Windows.UI.Xaml.Media.Matrix.Identity;
215+
#else
215216
return Matrix.Identity;
217+
#endif
216218
}
217219

218220
/// <summary>
@@ -461,5 +463,4 @@ private Size ComputeLargestTransformedSize(Size arrangeBounds)
461463
return computedSize;
462464
}
463465
#pragma warning restore CS8619
464-
#pragma warning restore CS1061
465466
}

0 commit comments

Comments
 (0)