Beispiel #1
0
 private void ConsiderRequestingData(AutoCompleteRequest request)
 {
     if (!this.communicationState.IsLoading)
     {
         this.RequestData(request);
     }
 }
Beispiel #2
0
        private void PopulatingHook(object sender, PopulatingEventArgs e)
        {
            var command   = this.SearchCommand;
            var parameter = new AutoCompleteRequest(e.Parameter, delegate
            {
                this.AssociatedObject.IsDropDownOpen = true;
                this.AssociatedObject.PopulateComplete();
                this.AssociatedObject.IsDropDownOpen = true;
            });

            if (command != null && command.CanExecute(parameter))
            {
                e.Cancel = true;
                command.Execute(parameter);
            }
        }
Beispiel #3
0
 public void RequestData(AutoCompleteRequest request)
 {
     if (this.pattern != request.Pattern)
     {
         this.pattern = request.Pattern;
         this.communicationState.StartLoading();
         var client = this.clientFactory.CreateSecurityPickerClient();
         client.RequestSecurities(
             request.Pattern,
             data =>
         {
             this.TakeData(data);
             request.Callback();
             this.communicationState.FinishLoading();
         },
             this.communicationState.FinishLoading
             );
     }
 }
Beispiel #4
0
 public AutoCompleteResponse(AutoCompleteRequest request, TResult result)
 {
     this.Request = request;
     this.Result  = result;
 }