Example #1
0
        partial void ApplyNativeClip(Rect rect)
        {
            if (rect.IsEmpty)
            {
                ViewCompat.SetClipBounds(this, null);
                return;
            }

            ViewCompat.SetClipBounds(this, rect.LogicalToPhysicalPixels());

            SetClipChildren(NeedsClipToSlot);
        }
Example #2
0
        partial void ApplyNativeClip(Rect rect)
        {
            // Non-UIElements typically expect to be clipped, and display incorrectly otherwise
            // This won't work when UIElements and non-UIElements are mixed in the same Panel,
            // but it should cover most cases in practice, and anyway should be superceded when
            // IFrameworkElement will be removed.
            SetClipChildren(FeatureConfiguration.UIElement.AlwaysClipNativeChildren ? AreChildrenNativeViewsOnly : false);

            if (rect.IsEmpty)
            {
                ViewCompat.SetClipBounds(this, null);
                return;
            }

            ViewCompat.SetClipBounds(this, rect.LogicalToPhysicalPixels());

            SetClipChildren(NeedsClipToSlot);
        }