提交 825bc0af 编写于 作者: M Martin Zikmund

fix: Properly warn the user about UpdateZoomedContentAlignment

上级 e2b11c44
...@@ -27,10 +27,6 @@ namespace Windows.UI.Xaml.Controls ...@@ -27,10 +27,6 @@ namespace Windows.UI.Xaml.Controls
set => global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.UI.Xaml.Controls.ScrollContentPresenter", "Color ScrollContentPresenter.BackgroundColor"); 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) private bool ChangeViewNative(double? horizontalOffset, double? verticalOffset, double? zoomFactor, bool disableAnimation)
=> (_presenter as ScrollContentPresenter)?.Set(horizontalOffset, verticalOffset, disableAnimation: disableAnimation) ?? true; => (_presenter as ScrollContentPresenter)?.Set(horizontalOffset, verticalOffset, disableAnimation: disableAnimation) ?? true;
......
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.");
}
}
}
...@@ -12,10 +12,6 @@ namespace Windows.UI.Xaml.Controls ...@@ -12,10 +12,6 @@ namespace Windows.UI.Xaml.Controls
{ {
internal Size ScrollBarSize => (_presenter as ScrollContentPresenter)?.ScrollBarSize ?? default; internal Size ScrollBarSize => (_presenter as ScrollContentPresenter)?.ScrollBarSize ?? default;
private void UpdateZoomedContentAlignment()
{
}
// Disable clipping for Scrollviewer (edge seems to disable scrolling if // 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) // the clipping is enabled to the size of the scrollviewer, even if overflow-y is auto)
bool ICustomClippingElement.AllowClippingToLayoutSlot => true; bool ICustomClippingElement.AllowClippingToLayoutSlot => true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册