Ejemplo n.º 1
0
        private void OnChildRemoved(UIElement child)
        {
            if (
#if __WASM__
                !FeatureConfiguration.FrameworkElement.WasmUseManagedLoadedUnloaded ||
#endif
                !IsLoaded ||
                !child._isFrameworkElement)
            {
                return;
            }

            if (child.IsLoaded)
            {
                child.OnElementUnloaded();
            }
            else
            {
                this.Log().Error($"{this}: Inconsistent state: child {child} is not loaded (OnChildRemoved)");
            }
        }
Ejemplo n.º 2
0
        private void OnChildRemoved(UIElement child)
        {
            if (
#if __WASM__
                !FeatureConfiguration.FrameworkElement.WasmUseManagedLoadedUnloaded ||
#endif
                !IsLoaded ||
                !child._isFrameworkElement)
            {
                return;
            }

            if (child.IsLoaded)
            {
                child.OnElementUnloaded();
            }
            else
            {
                if (this.Log().IsEnabled(LogLevel.Debug))
                {
                    this.Log().Debug($"{this.GetDebugName()}: Inconsistent state: child {child} is not loaded (OnChildRemoved). Common cause for this is an exception during Loaded handling.");
                }
            }
        }
Ejemplo n.º 3
0
 internal static void RootElementUnloaded(UIElement visualTreeRoot)
 => visualTreeRoot.OnElementUnloaded();
Ejemplo n.º 4
0
 internal static void RootElementUnloaded(UIElement visualTreeRoot)
 {
     visualTreeRoot.ClearHitTestVisibilityForRoot();
     visualTreeRoot.OnElementUnloaded();
 }