|
2 | 2 | // The .NET Foundation licenses this file to you under the MIT license.
|
3 | 3 | // See the LICENSE file in the project root for more information.
|
4 | 4 | using System.Diagnostics.CodeAnalysis;
|
5 |
| -#if WINAPPSDK |
6 |
| -using Microsoft.UI.Xaml.Media; |
7 |
| -#else |
8 |
| -using Windows.UI.Xaml.Media; |
9 |
| -#endif |
10 | 5 |
|
11 | 6 | namespace CommunityToolkit.WinUI.Controls;
|
12 | 7 |
|
@@ -57,7 +52,6 @@ public partial class LayoutTransformControl : Control
|
57 | 52 | /// </summary>
|
58 | 53 | #pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
59 | 54 | #pragma warning disable CS8619 //
|
60 |
| -#pragma warning disable CS1061 // |
61 | 55 | public LayoutTransformControl()
|
62 | 56 | #pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
63 | 57 | {
|
@@ -162,7 +156,11 @@ private Matrix GetTransformMatrix(Transform transform)
|
162 | 156 |
|
163 | 157 | if (transformGroup != null)
|
164 | 158 | {
|
| 159 | +#if HAS_UNO |
| 160 | + var groupMatrix = Windows.UI.Xaml.Media.Matrix.Identity; |
| 161 | +#else |
165 | 162 | var groupMatrix = Matrix.Identity;
|
| 163 | +#endif |
166 | 164 |
|
167 | 165 | foreach (var child in transformGroup.Children)
|
168 | 166 | {
|
@@ -212,7 +210,11 @@ private Matrix GetTransformMatrix(Transform transform)
|
212 | 210 | }
|
213 | 211 |
|
214 | 212 | // Fall back to no-op transformation
|
| 213 | +#if HAS_UNO |
| 214 | + return Windows.UI.Xaml.Media.Matrix.Identity; |
| 215 | +#else |
215 | 216 | return Matrix.Identity;
|
| 217 | +#endif |
216 | 218 | }
|
217 | 219 |
|
218 | 220 | /// <summary>
|
@@ -461,5 +463,4 @@ private Size ComputeLargestTransformedSize(Size arrangeBounds)
|
461 | 463 | return computedSize;
|
462 | 464 | }
|
463 | 465 | #pragma warning restore CS8619
|
464 |
| -#pragma warning restore CS1061 |
465 | 466 | }
|
0 commit comments