diff --git a/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.Managed.cs b/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.Managed.cs index 25544e8cbdb30f6134ebe8697eab7453626d8c52..911fabc1f5a41b882f6f432b312d782e0e052635 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.Managed.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.Managed.cs @@ -27,10 +27,6 @@ namespace Windows.UI.Xaml.Controls set => global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.UI.Xaml.Controls.ScrollContentPresenter", "Color ScrollContentPresenter.BackgroundColor"); } - [NotImplemented] - private void UpdateZoomedContentAlignment() - => global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.UI.Xaml.Controls.ScrollContentPresenter", "float ZoomFactor"); - private bool ChangeViewNative(double? horizontalOffset, double? verticalOffset, double? zoomFactor, bool disableAnimation) => (_presenter as ScrollContentPresenter)?.Set(horizontalOffset, verticalOffset, disableAnimation: disableAnimation) ?? true; diff --git a/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.crossruntime.cs b/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.crossruntime.cs new file mode 100644 index 0000000000000000000000000000000000000000..b2fe5218f8c06cdcb5018a910486dd2472f9f3e5 --- /dev/null +++ b/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.crossruntime.cs @@ -0,0 +1,24 @@ +using Uno; +using Uno.Foundation.Logging; + +namespace Windows.UI.Xaml.Controls; + +partial class ScrollViewer +{ + private static bool _warnedAboutZoomedContentAlignment; + + [NotImplemented] + private void UpdateZoomedContentAlignment() + { + if (_warnedAboutZoomedContentAlignment) + { + return; + } + + _warnedAboutZoomedContentAlignment = true; + if (this.Log().IsEnabled(LogLevel.Warning)) + { + this.Log().LogWarning("Zoom-based content alignment is not implemented on this platform."); + } + } +} diff --git a/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.wasm.cs b/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.wasm.cs index 39c1242b28503761a0bbdfa46979d56ea3d84f35..a01d49b3af75ece7ec001712766d27222130f420 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.wasm.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.wasm.cs @@ -12,10 +12,6 @@ namespace Windows.UI.Xaml.Controls { internal Size ScrollBarSize => (_presenter as ScrollContentPresenter)?.ScrollBarSize ?? default; - private void UpdateZoomedContentAlignment() - { - } - // Disable clipping for Scrollviewer (edge seems to disable scrolling if // the clipping is enabled to the size of the scrollviewer, even if overflow-y is auto) bool ICustomClippingElement.AllowClippingToLayoutSlot => true;