private uint GetTransition(CheckBoxState curState, CheckBoxState priorState) { if (renderer != null && Environment.OSVersion.Version.Major >= 6) { return(renderer.GetTransitionDuration((int)curState, (int)priorState)); } return(0); }
public AnimationTransition(VisualStyleRenderer rnd, T fromState, T toState) { if (rnd.State != Convert.ToInt32(fromState)) { rnd.SetParameters(rnd.Class, rnd.Part, Convert.ToInt32(fromState)); } currentState = fromState; newState = toState; duration = rnd.GetTransitionDuration(Convert.ToInt32(toState)); }