Skip to main content

BingSearchOptions Class

OBSOLETE

This class is obsolete. Microsoft deprecated Bing Maps on June 30th, 2025. For alternative providers, see https://www.devexpress.com/bing-maps-wpf

Contains settings that define the parameters for searching via the Microsoft Bing service.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

Declaration

[Obsolete("This class is obsolete. Microsoft deprecated Bing Maps on June 30th, 2025. For alternative providers, see https://www.devexpress.com/bing-maps-wpf")]
[PreferableMember("BingSearchOptions", "", "")]
public class BingSearchOptions :
    MapDependencyObject

The following members return BingSearchOptions objects:

Remarks

Bing Search options are represented by the BingSearchOptions object that can be accessed via the BingSearchDataProvider.SearchOptions property.

Then, you can specify the displayed number of search results (BingSearchOptions.ResultsCount) and other search parameters.

Example

This example demonstrates how to allow users to search for a specific place on a map using the Search panel.

Important

On May 21, 2024, Microsoft announced that Bing Maps for Enterprise and its API will be discontinued. Azure Maps will be a single unified enterprise mapping platform available from Microsoft.

To obtain and display map data from Azure Maps, we implemented the following providers:

For information on how to migrate your app from Bing Maps to Azure Maps, see the following help topic: DevExpress Map Control for WPF: Migrate from Bing Maps to Azure Maps.

If you already have a Bing Maps for Enterprise license, you can keep using the current API. You must transition to the new API by June 30, 2025 (for free/basic licenses) or June 30, 2028 (for enterprise licenses). New licenses will no longer be available after June 30, 2025. Bing Maps will not work with our map controls without a license after that date.

To enable searching in the map control, do the following.

The Search panel appears automatically (since the MapControl.ShowSearchPanel property value is true by default).

<dxm:InformationLayer.DataProvider>
    <dxm:BingSearchDataProvider BingKey="{Binding Source={StaticResource YourBingKey}}">
        <dxm:BingSearchDataProvider.SearchOptions>
            <dxm:BingSearchOptions ResultsCount="5" />
        </dxm:BingSearchDataProvider.SearchOptions>
    </dxm:BingSearchDataProvider>
</dxm:InformationLayer.DataProvider>

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

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.

See Also