Beispiel #1
0
        public void InvalidateArrange()
        {
            if (ShouldInterceptInvalidate)
            {
                return;
            }

            if (IsArrangeDirty)
            {
                return;                 // Already dirty
            }

            SetLayoutFlags(LayoutFlag.ArrangeDirty);

            if (FeatureConfiguration.UIElement.UseInvalidateArrangePath && !IsArrangeDirtyPathDisabled)
            {
                InvalidateParentArrangeDirtyPath();
            }
            else
            {
                (this.GetParent() as UIElement)?.InvalidateArrange();
                if (IsVisualTreeRoot)
                {
#if __SKIA__
                    XamlRoot.InvalidateArrange();
#else
                    Window.InvalidateArrange();
#endif
                }
            }
        }
Beispiel #2
0
        private void InvalidateParentArrangeDirtyPath()
        {
            if (this.GetParent() is UIElement parent)             //TODO: Should this use VisualTree.GetParent as fallback? https://github.com/unoplatform/uno/issues/8978
            {
                parent.InvalidateArrangeDirtyPath();
            }
            else             //TODO: Why not check IsVisualTreeRoot as in InvalidateParentMeasureDirtyPath?
            {
#if __SKIA__
                XamlRoot?.InvalidateArrange();
#else
                Window.InvalidateArrange();
#endif
            }
        }