Back to Devexpress

BingSearchOptions.ResultsCount Property

wpf-devexpress-dot-xpf-dot-map-dot-bingsearchoptions.md

latest3.8 KB
Original Source

BingSearchOptions.ResultsCount Property

Gets or sets the total number of results that can be obtained by a search request.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public int ResultsCount { get; set; }
vb
Public Property ResultsCount As Integer

Property Value

TypeDescription
Int32

An integer value.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ResultsCount
BingSearchDataProvider

.SearchOptions .ResultsCount

|

Example

View Example

xaml
<dxm:InformationLayer.DataProvider>
    <dxm:BingSearchDataProvider x:Name="searchProvider" 
                                ShowSearchPanel="False"
                                BingKey="{Binding Source={StaticResource bingKey}}"
                                SearchCompleted="searchProvider_SearchCompleted">
        <dxm:BingSearchDataProvider.SearchOptions>
            <dxm:BingSearchOptions x:Name="options"
                                   AutocorrectQuery="{Binding ElementName=cbAutocorrect, Path=IsChecked}"
                                   DistanceUnit="{Binding ElementName=lbDistanceUnits, Path=SelectedValue}"
                                   ResultsCount="{Binding ElementName=tbCount, Path=Value}">
            </dxm:BingSearchOptions>
        </dxm:BingSearchDataProvider.SearchOptions>
    </dxm:BingSearchDataProvider>
</dxm:InformationLayer.DataProvider>
        <TextBox Name="tbCount" Grid.Row="1" Grid.Column="1" Margin="2,2,4,2" Padding="4">
            <TextBox.Text>
                <Binding NotifyOnValidationError="True" Path="ResultsCount" ElementName="options" Mode="TwoWay">
                    <Binding.ValidationRules>
                        <local:NonNegativeIntValidationRule/>
                    </Binding.ValidationRules>
                </Binding>
            </TextBox.Text>
        </TextBox>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ResultsCount property.

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#L43

xml
DistanceUnit="{Binding ElementName=lbDistanceUnits, Path=SelectedValue}"
                       ResultsCount="{Binding ElementName=tbCount, Path=Value}">
</dxm:BingSearchOptions>

See Also

BingSearchOptions Class

BingSearchOptions Members

DevExpress.Xpf.Map Namespace