Back to Devexpress

AzureSearchDataProvider.Search(String, Int32) Method

wpf-devexpress-dot-xpf-dot-map-dot-azuresearchdataprovider-dot-search-x28-system-dot-string-system-dot-int32-x29.md

latest3.5 KB
Original Source

AzureSearchDataProvider.Search(String, Int32) Method

Searches for locations that best correspond to the specified keywords.

Namespace : DevExpress.Xpf.Map

Assembly : DevExpress.Xpf.Map.v25.2.dll

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public void Search(
    string keyword,
    int maxResults = 5
)
vb
Public Sub Search(
    keyword As String,
    maxResults As Integer = 5
)

Parameters

NameTypeDescription
keywordString

A string that contains information to search on a map.

|

Optional Parameters

NameTypeDefaultDescription
maxResultsInt325

The number of results that can be obtained by a search request.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Search(String, Int32) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-map-process-search-with-a-custom-search-panel/CS/MapControl_SearchPanel/MainWindow.xaml.cs#L18

csharp
tbSearchResult.Text = "";
    searchProvider.Search(tbLocation.Text);
}

wpf-map-search-with-azure-map-search-service/CS/DXMapExample/MainWindow.xaml.cs#L14

csharp
private void Search_Click(object sender, RoutedEventArgs e) {
    searchDataProvider.Search(teKeywords.Text);
}

wpf-map-process-search-with-a-custom-search-panel/VB/MapControl_SearchPanel/MainWindow.xaml.vb#L20

vb
Me.tbSearchResult.Text = ""
    Me.searchProvider.Search(Me.tbLocation.Text)
End Sub

wpf-map-search-with-azure-map-search-service/VB/DXMapExample/MainWindow.xaml.vb#L16

vb
Private Sub Search_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    Me.searchDataProvider.Search(Me.teKeywords.Text)
End Sub

See Also

AzureSearchDataProvider Class

AzureSearchDataProvider Members

DevExpress.Xpf.Map Namespace