private void UpdateLayout(Widget viewToUpdate, IViewManager viewManager, Dimensions dimensions) { var Widget = viewToUpdate as Widget; if (Widget != null && _layoutAnimator.ShouldAnimateLayout(Widget)) { _layoutAnimator.ApplyLayoutUpdate(Widget, dimensions); } else { viewManager.SetDimensions(viewToUpdate, dimensions); } }
private void UpdateLayout(DependencyObject viewToUpdate, IViewManager viewManager, Dimensions dimensions) { var frameworkElement = viewToUpdate as FrameworkElement; if (frameworkElement != null && _layoutAnimator.ShouldAnimateLayout(frameworkElement)) { _layoutAnimator.ApplyLayoutUpdate(frameworkElement, dimensions); } else { ; viewManager.SetDimensions(viewToUpdate, dimensions); } }
private void UpdateLayout(FrameworkElement viewToUpdate, int x, int y, int width, int height) { var layoutManager = default(ILayoutManager); if (_layoutAnimator.ShouldAnimateLayout(viewToUpdate)) { _layoutAnimator.ApplyLayoutUpdate(viewToUpdate, x, y, width, height); } else if ((layoutManager = viewToUpdate as ILayoutManager) != null) { layoutManager.UpdateLayout(x, y, width, height); } else { Canvas.SetLeft(viewToUpdate, x); Canvas.SetTop(viewToUpdate, y); viewToUpdate.Width = width; viewToUpdate.Height = height; } }