Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

WidgetView.BeginUpdateAnimation() Method

In This Article

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

Namespace: DevExpress.XtraBars.Docking2010.Views.Widget

Assembly: DevExpress.XtraBars.v24.2.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