private void ConsiderRequestingData(AutoCompleteRequest request) { if (!this.communicationState.IsLoading) { this.RequestData(request); } }
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); } }
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 ); } }
public AutoCompleteResponse(AutoCompleteRequest request, TResult result) { this.Request = request; this.Result = result; }