Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

MapSearchPanelOptions.NullValuePrompt Property

Gets or sets the text displayed in the search panel when no search requests are entered.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

NuGet Package: DevExpress.Win.Map

#Declaration

[DefaultValue("")]
public string NullValuePrompt { get; set; }

#Property Value

Type Default Description
String String.Empty

The prompt text.

#Property Paths

You can access this nested property as listed below:

Object Type Path to NullValuePrompt
MapControl
.SearchPanelOptions .NullValuePrompt

#Remarks

Use the ShowNullValuePrompt property to specify whether the search panel shows the prompt.

#Example

The following example configures the search panel options such as width, prompt message, and so on:

Map search panel customization

using DevExpress.XtraMap;

    private void OnFormLoad(object sender, EventArgs e) {
        // Enable search:
        InformationLayer infoLayer = new InformationLayer();
        mapControl1.Layers.Add(infoLayer);
        BingSearchDataProvider searchProvider = new BingSearchDataProvider();
        infoLayer.DataProvider = searchProvider;
        searchProvider.BingKey = bingKey;

        // Specify search panel options:
        mapControl1.SearchPanelOptions.Visible = true;
        mapControl1.SearchPanelOptions.ShowNullValuePrompt = true;
        mapControl1.SearchPanelOptions.NullValuePrompt = "Type a location to search...";
        mapControl1.SearchPanelOptions.MaxVisibleItemCount = 3;
        mapControl1.SearchPanelOptions.Width = 200;
    }
See Also