diff --git a/src/Uno.UI/UI/Xaml/UIElement.cs b/src/Uno.UI/UI/Xaml/UIElement.cs index 9015f2d5c3bb..faa2b7fab4e8 100644 --- a/src/Uno.UI/UI/Xaml/UIElement.cs +++ b/src/Uno.UI/UI/Xaml/UIElement.cs @@ -47,6 +47,9 @@ namespace Microsoft.UI.Xaml public partial class UIElement : DependencyObject, IXUidProvider { private protected static bool _traceLayoutCycle; +#if !__SKIA__ + private bool _warnedAboutTranslation; +#endif private static readonly TypedEventHandler OnBringIntoViewRequestedHandler = (UIElement sender, BringIntoViewRequestedEventArgs args) => sender.OnBringIntoViewRequested(args); @@ -265,6 +268,19 @@ public Vector3 Translation if (_translation != value) { _translation = value; + +#if !__SKIA__ + if (!_warnedAboutTranslation && + (_translation.X != 0 || _translation.Y != 0)) + { + _warnedAboutTranslation = true; + if (this.Log().IsEnabled(LogLevel.Warning)) + { + this.Log().LogWarning("Translation supports only Z-axis on this target."); + } + } +#endif + UpdateShadow(); InvalidateArrange(); }