private void UpdateContentTranslate(bool animated) { if (!PatchHelper.OptionPatchSupport) { return; } var width = PatchUpdater.Instance.NothingAtAll ? (GridSplitter.GetWidth() ?? 0d) : 0d; if (animated) { var easing = _selectionEasingFunction ?? (_selectionEasingFunction = (EasingFunctionBase)FindResource(@"StandardEase")); ((TranslateTransform)LinksList.RenderTransform).BeginAnimation(TranslateTransform.XProperty, new DoubleAnimation { To = -width, Duration = new Duration(TimeSpan.FromSeconds(0.5)), EasingFunction = easing }); ((TranslateTransform)GridSplitter.RenderTransform).BeginAnimation(TranslateTransform.XProperty, new DoubleAnimation { To = -width, Duration = new Duration(TimeSpan.FromSeconds(0.5)), EasingFunction = easing }); ((TranslateTransform)ContentCell.RenderTransform).BeginAnimation(TranslateTransform.XProperty, new DoubleAnimation { To = -width / 3.5, Duration = new Duration(TimeSpan.FromSeconds(0.5)), EasingFunction = easing }); } else { ((TranslateTransform)LinksList.RenderTransform).BeginAnimation(TranslateTransform.XProperty, null); ((TranslateTransform)LinksList.RenderTransform).X = -width; ((TranslateTransform)GridSplitter.RenderTransform).BeginAnimation(TranslateTransform.XProperty, null); ((TranslateTransform)GridSplitter.RenderTransform).X = -width; ((TranslateTransform)ContentCell.RenderTransform).BeginAnimation(TranslateTransform.XProperty, null); ((TranslateTransform)ContentCell.RenderTransform).X = -width / 3.5; } }