private void OnUIElementsAdded(object sender, UIElementsEventArgs e) { foreach (UIElement element in e.Elements) { _stateDict.Add(element, new MetaElementState(element)); } }
/// <summary> /// Raises the UIElementsRemove event. /// </summary> /// <param name="e">An UIElementsEventArgs containing the event data.</param> protected virtual void OnUIElementsRemove(UIElementsEventArgs e) { EventHandler <UIElementsEventArgs> handler = UIElementsRemove; if (handler != null) { handler(this, e); } }
private void OnUIElementsRemove(object sender, UIElementsEventArgs e) { foreach (UIElement element in e.Elements) { MetaElementState elementState = _stateDict[element]; elementState.Status = MetaElementStatus.Removing; elementState.TargetChanged = true; } // If we are animating the removal of an element then it might not cause a // measure to occur because we do not actually remove it from the visual // collection. So force measure here so animation will be started. InvalidateMeasure(); }
private void OnUIElementsAdded(object sender, UIElementsEventArgs e) { foreach (UIElement element in e.Elements) _stateDict.Add(element, new MetaElementState(element)); }
/// <summary> /// Raises the UIElementsRemove event. /// </summary> /// <param name="e">An UIElementsEventArgs containing the event data.</param> protected virtual void OnUIElementsRemove(UIElementsEventArgs e) { EventHandler<UIElementsEventArgs> handler = UIElementsRemove; if (handler != null) handler(this, e); }