How to: Create a Custom Search Panel

  • 2 minutes to read

This example demonstrates how to implement a custom search panel. Do this as follows:


Refer to How to: Get a Bing Maps Key if you run the application and see a window with the following error message: "The specified Bing Maps key is invalid. To create a developer account, refer to".

using System;
using System.Windows.Forms;
using DevExpress.XtraMap;

namespace MapControl_SearchPanel {
    public partial class Form1 : Form {
        InformationLayer SearchLayer { get { return (InformationLayer)mapControl1.Layers["SearchLayer"]; } }
        BingSearchDataProvider SearchProvider { get { return (BingSearchDataProvider)SearchLayer.DataProvider; } }

        public Form1() {
            SearchLayer.DataRequestCompleted += SearchLayer_DataRequestCompleted;

        void SearchLayer_DataRequestCompleted(object sender, RequestCompletedEventArgs e) {

        private void bSearch_Click(object sender, EventArgs e) {