Answer the question
In order to leave comments, you need to log in
Multithreading in windows phone?
The task is to click on the button so that, say, an element like loading appears on the screen, and after the appearance of this element on the screen, some work is performed
Answer the question
In order to leave comments, you need to log in
There are a lot of options. Here is a simple example a la MVVM.
private bool _isBusy;
// свойство для индикации
public bool IsBusy
{
get { return _isBusy; }
set
{
_isBusy = value;
RaiseNotifyPropertyChanged("IsBusy"); // реализация интерфейса INotifyPropertyChanged
}
}
public async Task ButtonClickFunc()
{
IsBusy = true; // запускаем индикацию
await Task.Delay(TimeSpan.FromSeconds(5000));
IsBusy = false; // выключаем индикацию.
}
<!-- XAML code -->
<control:BusyIndicator IsIndeterminate="{Binding IsBusy"} />
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question