WidgetView.EndUpdateAnimation() Method

Unlocks this WidgetView and animates all changes executed to its layout.

Namespace: DevExpress.XtraBars.Docking2010.Views.Widget

Assembly: DevExpress.XtraBars.v20.2.dll

Declaration

public void EndUpdateAnimation()
Public Sub

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 WidgetView.BeginUpdateAnimation and EndUpdateAnimation methods. This will prevent the animation from being played 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