H
H
Horoko2016-01-22 11:54:39
.NET
Horoko, 2016-01-22 11:54:39

How to prevent page instances from being called more than 1 time (UWP)?

I'm calling the transition to another page with the Frame.Navigate(). And if you tap on the button several times, then the program will open several instances of the page. Of course, I can put it right isEnabled = falseon the button, but this option is not the best, as I understand it. Actually a subject.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tsiren Naimanov, 2016-01-22
@Horoko

if (frame.CurrentSourcePageType != typeof(LALA) && typeof(LALA) != null)
{
 frame.Navigate(typeof(LALA));
}

D
Dmitry Kovalsky, 2016-01-22
@dmitryKovalskiy

This is the normal option. Turn off the button and turn it on when the download is complete.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question