Bonjour,

J'essaie de mettre en place un Busyindicator lors de l'appel de méthodes de services WCF.

Voici mon code coté xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
<toolkit:BusyIndicator x:Name="BusyWindow" Content=""  BusyContent="Tentative de connection..." IsBusy="{Binding IsLoading}" />
et voici mon code coté .cs

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
private void AppelWCF()
{
         IsLoading = true;
         ServiceRequest req = new ServiceRequest();
         MonService.ConnecterCompleted += new EventHandler<ServiceCompletedEventArgs>(AppelWCFEvent);
 
         try
         {
              MonService.ServiceAsync(req);
         }
         catch (Exception ex){}
}
 private void AppelWCFEvent(object sender, ServiceCompletedEventArgs e)
 {
          if (e.Error == null)
          {
                ServiceResponse rep = e.Result;
                //Traitement
                IsLoading = false;
          }
}
Ma classe étant de
avec le code suivant : INotifyPropertyChanged
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
private bool _isLoading = true;
        public bool IsLoading
        {
            get { return this._isLoading; }
            private set
            {
                if (this._isLoading != value)
                {
                    this._isLoading = value;
                    this.RaisePropertyChanged("IsLoading");
                }
            }
        }
 
 
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
 
        protected void RaisePropertyChanged(string propertyName)
        {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null))
            {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
Lorsque je lance l'application, rien ne se passe, une idée de ce que j'ai pu oublié?

Merci d'avance