// Sets the currently selected symbol
        private void SymbolListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count != 1)
            {
                return;
            }

            _selectedSymbol = e.AddedItems[0] as SymbolViewModel;

            Dictionary <string, string> values = (Dictionary <string, string>)_selectedSymbol.Model.Values;
            string    geometryControlType      = values["GeometryType"];
            DrawShape requestedShape           = DrawShape.Point;

            switch (geometryControlType)
            {
            case "Point":
                requestedShape = DrawShape.Point;
                break;

            case "Line":
                requestedShape = DrawShape.Polyline;
                break;

            case "Polygon":
                requestedShape = DrawShape.Polygon;
                break;

            case "Circle":
                requestedShape = DrawShape.Circle;
                break;

            case "Rectangular":
                requestedShape = DrawShape.Rectangle;
                break;

            default:
                MessageBox.Show("Selected symbol is not supported in this sample");
                return;
            }

            // Enable adding symbols to the map
            AddSymbolAsync(requestedShape);
        }
        // Sets the currently selected symbol
        private void SymbolListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count != 1)
                return;

            _selectedSymbol = e.AddedItems[0] as SymbolViewModel;

            Dictionary<string, string> values = (Dictionary<string, string>)_selectedSymbol.Model.Values;
            string geometryControlType = values["GeometryType"];
            DrawShape requestedShape = DrawShape.Point;

            switch (geometryControlType)
            {
                case "Point":
                    requestedShape = DrawShape.Point;
                    break;
                case "Line":
                    requestedShape = DrawShape.Polyline;
                    break;
                case "Polygon":
                    requestedShape = DrawShape.Polygon;
                    break;
                case "Circle":
                    requestedShape = DrawShape.Circle;
                    break;
                case "Rectangular":
                    requestedShape = DrawShape.Rectangle;
                    break;
                default:
                    MessageBox.Show("Selected symbol is not supported in this sample");
                    return;
            }

            // Enable adding symbols to the map
            AddSymbolAsync(requestedShape);
        }