Exemplo n.º 1
0
 private void OnAddingChild(UIElement child)
 {
     if (IsLoaded)
     {
         child.OnElementLoaded();
     }
 }
Exemplo n.º 2
0
        private void OnChildAdded(UIElement child)
        {
            if (
#if __WASM__
                !FeatureConfiguration.FrameworkElement.WasmUseManagedLoadedUnloaded ||
#endif
                !IsLoaded ||
                !child._isFrameworkElement)
            {
                return;
            }

            if (child.IsLoaded)
            {
                this.Log().Error($"{this}: Inconsistent state: child {child} is already loaded (OnChildAdded)");
            }
            else
            {
                child.OnElementLoaded();
            }
        }
Exemplo n.º 3
0
        private void OnChildAdded(UIElement child)
        {
            if (
#if __WASM__
                !FeatureConfiguration.FrameworkElement.WasmUseManagedLoadedUnloaded ||
#endif
                !IsLoaded ||
                !child._isFrameworkElement)
            {
                return;
            }

            if (child.IsLoaded)
            {
                if (this.Log().IsEnabled(LogLevel.Debug))
                {
                    this.Log().Debug($"{this.GetDebugName()}: Inconsistent state: child {child} is already loaded (OnChildAdded). Common cause for this is an exception during Unloaded handling.");
                }
            }
            else
            {
                child.OnElementLoaded();
            }
        }
Exemplo n.º 4
0
 internal static void RootElementLoaded(UIElement visualTreeRoot)
 => visualTreeRoot.OnElementLoaded();
Exemplo n.º 5
0
 internal static void RootElementLoaded(UIElement visualTreeRoot)
 {
     visualTreeRoot.SetHitTestVisibilityForRoot();
     visualTreeRoot.OnElementLoaded();
 }