This is a migrated thread and some comments may be shown as answers.

BusyIndicator in closedHandler of InputPrompt

2 Answers 50 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stephan
Top achievements
Rank 2
Stephan asked on 03 Jun 2013, 06:41 AM
Hi All,

I'm using the RadInputPrompt to ask the user for some input. In the closedHandler delegate I'm starting an operation that may take up to some seconds. In the mean time I'd like to show the busy indicator but don't know how to do it. I tried to create a new instance in the closeHandler for the input prompt but the busy indicator won't show up. I guess it's because I didn't specify a parent. It would be great if I could just show start showing the busy indicator on the whole page while the closedHandler is running.

Kind Regards,
Stephan

2 Answers, 1 is accepted

Sort by
0
Accepted
Todor
Telerik team
answered on 03 Jun 2013, 08:48 AM
Hello Stephan,

Thank you for your interest in RadInputPrompt.

You can add the busy indicator to the page, as long as it is not running (IsRunning = false), it won't be visible. Then in the closed handler you can set the IsRunning property to true and display the indicator. Here's an example of how you can do this:
RadInputPrompt.Show("Title",
    closedHandler: (closedArgs) =>
        {
            busy.IsRunning = true;
            Dispatcher.BeginInvoke(() =>
                {
                    // Perform your time consuming actions here.
                    Dispatcher.BeginInvoke(() =>
                        {
                            busy.IsRunning = false;
                        });
                });
        });

Here, "busy" is the name of the RadBusyIndicator instance that you have added to your page.

I hope this information helps. Let me know if you need additional assistance.

Regards,
Todor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Stephan
Top achievements
Rank 2
answered on 05 Jun 2013, 01:03 PM
Hi Todor,

thanks for your answer. It was just to obvious to define the busy indicator on the page and just change isRunning in the closed handler accordingly. I didn't try but I'm sure it works.

Thanks again,
Kind Regards,
Stephan
Tags
BusyIndicator
Asked by
Stephan
Top achievements
Rank 2
Answers by
Todor
Telerik team
Stephan
Top achievements
Rank 2
Share this question
or