public PathPreviewVisual(Path newPath, Path actualPath, NoneHandler hideCompletedCallback) { NewPath = newPath; ActualPath = actualPath; HideCompletedCallback = hideCompletedCallback; EffectsController = new EffectsController<IVisual>(); State = PPVState.HidingEnded; }
public void Hide() { if (State == PPVState.HidingStarted || State == PPVState.HidingEnded) return; var effect = VisualEffects.Fade(ActualPath.Alpha, 100, 0, 500); EffectsController.Add(ActualPath, effect, HideCompleted); effect = VisualEffects.Fade(NewPath.Alpha, 0, 0, 500); EffectsController.Add(NewPath, effect); State = PPVState.HidingStarted; }
private void HideCompleted(int id) { HideCompletedCallback(); State = PPVState.HidingEnded; }
private void ShowCompleted(int id) { State = PPVState.ShowingEnded; }