private void UpdateColumnsLayout() { if (_lastWidth != ActualWidth) { _lastWidth = ActualWidth; _sectionSize = _lastWidth / 3d; ColumnFirst.Width = _sectionSize; ColumnSecond.Width = _sectionSize; ColumnThird.Width = _sectionSize; TransformFirst.BeginAnimation(TranslateTransform.XProperty, null); TransformSecond.BeginAnimation(TranslateTransform.XProperty, null); TransformThird.BeginAnimation(TranslateTransform.XProperty, null); TransformFirst.X = GetTranslateX(0); TransformSecond.X = GetTranslateX(1); TransformThird.X = GetTranslateX(2); } }
private async Task UpdateStoryboard() { if (_updating) { return; } _updating = true; IsHitTestVisible = false; await Task.Yield(); TransformFirst.BeginAnimation(TranslateTransform.XProperty, AnimateX(GetTranslateX(0))); TransformSecond.BeginAnimation(TranslateTransform.XProperty, AnimateX(GetTranslateX(1))); TransformThird.BeginAnimation(TranslateTransform.XProperty, AnimateX(GetTranslateX(2))); _updating = false; await Task.Delay(200); IsHitTestVisible = true; }