{
base.OnCreateTrack(switchButton, track);
track.Relayout += (s, e) => {
+ if (slidingAnimation.State == Animation.States.Playing) return;
switchButton.Thumb.PositionX = switchButton.IsSelected ? switchButton.Track.Size.Width - switchButton.Thumb.Size.Width : 0;
};
return track;
{
base.OnCreateThumb(switchButton, thumb);
thumb.Relayout += (s, e) => {
+ if (slidingAnimation.State == Animation.States.Playing) return;
thumb.PositionX = switchButton.IsSelected ? switchButton.Track.Size.Width - thumb.Size.Width : 0;
};
return thumb;