Devexpress XAF. How can I close View after Application.ShowViewStrategy.ShowMessage durations ends?

92 Views Asked by At

After going through the registration procedure, I want to show a notification about the successful completion of the registration and close the registration window. How to do it automatically after message duration timeout?

MessageOptions options = new MessageOptions();
                options.Message = "Registration successful";
                options.Duration = 3000;
                options.Type = InformationType.Success;
                options.Web.Position = InformationPosition.Top;
                Application.ShowViewStrategy.ShowMessage(options);

View.Close(false);
            Application.LogOff();

I tried adding a wait for the thread, but first there is a wait, then a message is shown for half a second, and after that the window closes.

Task.Delay(3000).Wait();
Thread.Sleep(3000);
0

There are 0 best solutions below