UpdateLayout() public method

public UpdateLayout ( ) : void
return void
        // Forward to the next element
        private void Forward(UIElement element, bool click)
        {
            Detach();
            if (click)
            {
                //element.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, null));
                var control = element as IKeyTipedControl;
                if (control != null) control.OnKeyTipPressed();
                element.UpdateLayout();
            }

            var children = LogicalTreeHelper.GetChildren(element)
                .Cast<object>()
                .Where(x => x is UIElement)
                .Cast<UIElement>().ToArray();
            if (children.Length == 0) { Terminate(); return; }

            childAdorner = GetTopLevelElement(children[0]) != GetTopLevelElement(element) ?
                new KeyTipAdorner(children[0], element, this) :
                new KeyTipAdorner(element, element, this);

            Detach();
            childAdorner.Attach();
        }
        private async Task ToImage(UIElement element)
        {
            element.Measure(new Size(480, 800));
            element.Arrange(new Rect{ Height = 800, Width = 480});
            element.UpdateLayout();

            var bitmap = new WriteableBitmap(480, 800);
            bitmap.Render(element, null);
            bitmap.Invalidate();

            await SaveTheImage(bitmap);
        }
        private async Task ToImage(UIElement element, double width, double height)
        {
            element.Measure(new Size(width, height));
            element.Arrange(new Rect { Height = height, Width = width });
            element.UpdateLayout();

            var bitmap = new WriteableBitmap((int)width, (int)height);
            bitmap.Render(element, null);
            bitmap.Invalidate();

            await SaveTheImage(bitmap, WideTileUrl);
        }
 public static void UpdateLayoutAndDoEvents(UIElement element, DispatcherPriority priority) {
     element.UpdateLayout();
     DoEvents(priority);
 }