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)"); } }
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."); } } }
internal static void RootElementUnloaded(UIElement visualTreeRoot) => visualTreeRoot.OnElementUnloaded();
internal static void RootElementUnloaded(UIElement visualTreeRoot) { visualTreeRoot.ClearHitTestVisibilityForRoot(); visualTreeRoot.OnElementUnloaded(); }