Skip to main content

WidgetView.BeginUpdateAnimation() Method

Locks the current layout and prevents it from playing document animation.

Namespace: DevExpress.XtraBars.Docking2010.Views.Widget

Assembly: DevExpress.XtraBars.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public void BeginUpdateAnimation()

Remarks

WidgetView supports document animation, played when documents are moved or maximized/restored. If you make adjustments to your WidgetView layout in code that include widget re-arrangement, wrap this piece of code with the BeginUpdateAnimation and WidgetView.EndUpdateAnimation methods. This will prevent the animation from playing for every minor change and instead, display one animation for the final layout version.

For example, the following code moves all widgets from stackGroup1 to stackGroup2, one at a time. Once the stackGroup1 is empty, an end-user sees all widgets moving at once, which is followed by an animation.

private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
    widgetView1.BeginUpdateAnimation();
    while (stackGroup1.Items.Count != 0) {
        Document moveDoc = stackGroup1.Items[0];
        stackGroup1.Items.Remove(moveDoc);
        stackGroup2.Items.Add(moveDoc);
    }
    widgetView1.EndUpdateAnimation();
}
See Also