public static void Hide(this UIElement element, int duration, Action <UIElement> callback) { UIElementExtensions.SetOpacity(element, duration, 0.0d, (e) => { e.Visibility = Visibility.Collapsed; if (callback != null) { callback(e); } }); }
public static void Show(this UIElement element, int duration, Action <UIElement> callback) { element.Visibility = Visibility.Visible; UIElementExtensions.SetOpacity(element, duration, 1.0d, (e) => { if (callback != null) { callback(e); } }); }