private void expandVolumeBarTemporarily() { // avoid starting a new transform if one is already active. if (expandTransform == null) { expandTransform = volumeDisplay.ResizeWidthTo(6, 500, Easing.OutQuint); expandTransform.Finally(_ => expandTransform = null); } contractTransform?.Cancel(); contractTransform = Scheduler.AddDelayed(() => { volumeDisplay.ResizeWidthTo(3f, 500, Easing.OutQuint); }, 1000); }