Exemple #1
0
 public VisualStateManager(StatePresenter presenter)
 {
     presenter.RegisterLoadActions(
         loaded: () => presenter.StateChanged   += GoToState,
         unloaded: () => presenter.StateChanged -= GoToState
         );
 }
Exemple #2
0
        public static StatePresenter AddVisualState(this StatePresenter presenter, UIControlState state, Action apply, Action restore)
        {
            var manager = _managers.GetValue(presenter, "Manager", () => new VisualStateManager(presenter));

            manager.Add(state, new ObjectAnimation(apply, restore));
            return(presenter);
        }