/// <summary>
 /// Creates the new custom symbolizer with the specified name and category
 /// </summary>
 /// <returns>the custom symbolizer</returns>
 private CustomSymbolizer CreateCustomSymbolizer()
 {
     CustomSymbolizer custSym = null;
     if (_symbolizer is PointSymbolizer)
     {
         custSym = new CustomPointSymbolizer();
     }
     else if (_symbolizer is LineSymbolizer)
     {
         custSym = new CustomLineSymbolizer();
     }
     else if (_symbolizer is PolygonSymbolizer)
     {
         custSym = new CustomPolygonSymbolizer();
     }
     if (custSym != null)
     {
         custSym.Symbolizer = _symbolizer;
         custSym.Name = _txtSymbolName.Text;
         custSym.Category = _cmbSymbolCategory.Text;
         return custSym;
     }
     return null;
 }
        private static List<CustomLineSymbolizer> GetLineSymbols()
        {
            List<CustomLineSymbolizer> lst = new List<CustomLineSymbolizer>();




            LineSymbolizer sym1 = new LineSymbolizer();
            sym1.Strokes.Clear();
            SimpleStroke stroke11 = new SimpleStroke(Color.DarkGray);
            sym1.Strokes.Add(stroke11);
            CustomLineSymbolizer cust1 = new CustomLineSymbolizer();
            cust1.Symbolizer = sym1;
            cust1.UniqueName = "line_0001";
            cust1.Name = "simple line";
            cust1.Category = "Transportation";
            lst.Add(cust1);
            

            LineSymbolizer sym2 = new LineSymbolizer();
            sym2.Strokes.Clear();
            SimpleStroke stroke1 = new SimpleStroke(2.5, Color.Brown);
            sym2.Strokes.Add(stroke1);
            SimpleStroke stroke0 = new SimpleStroke(1.0, Color.Yellow);
            sym2.Strokes.Add(stroke0);
            CustomLineSymbolizer cust2 = new CustomLineSymbolizer();
            cust2.Symbolizer = sym2;
            cust2.UniqueName = "line_0002";
            cust2.Name = "Road";
            cust2.Category = "Transportation";
            lst.Add(cust2);

            LineSymbolizer sym3 = new LineSymbolizer();
            sym3.Strokes.Clear();
            CartographicStroke stroke3 = new CartographicStroke(Color.Brown);
            stroke3.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
            sym3.Strokes.Add(stroke3);
            CustomLineSymbolizer cust3 = new CustomLineSymbolizer();
            cust3.Symbolizer = sym3;
            cust3.UniqueName = "line_0003";
            cust3.Category = "Transportation";
            cust3.Name = "Path";
            lst.Add(cust3);

            LineSymbolizer sym4 = new LineSymbolizer();
            sym4.Strokes.Clear();
            SimpleStroke stroke41 = new SimpleStroke(4.5,Color.Gray);
            SimpleStroke stroke42 = new SimpleStroke(2.5, Color.Yellow);
            SimpleStroke stroke43 = new SimpleStroke(0.5, Color.Gray);
            sym4.Strokes.Add(stroke41);
            sym4.Strokes.Add(stroke42);
            sym4.Strokes.Add(stroke43);
            CustomLineSymbolizer cust4 = new CustomLineSymbolizer();
            cust4.Symbolizer = sym4;
            cust4.UniqueName = "line_0004";
            cust4.Category = "Transportation";
            cust4.Name = "Highway";
            lst.Add(cust4);

            LineSymbolizer sym5 = new LineSymbolizer();
            sym5.Strokes.Clear();
            CartographicStroke stroke51 = new CartographicStroke(Color.Gray);
            CartographicStroke stroke52 = new CartographicStroke(Color.LightPink);
            stroke52.Width = 4.0;
            stroke52.Offset = 2.5f;
            stroke52.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;
            sym5.Strokes.Add(stroke51);
            sym5.Strokes.Add(stroke52);         
            CustomLineSymbolizer cust5 = new CustomLineSymbolizer();
            cust5.Symbolizer = sym5;
            cust5.UniqueName = "line_0005";
            cust5.Category = "Boundaries";
            cust5.Name = "Boundary 1";
            lst.Add(cust5);


            LineSymbolizer sym6 = new LineSymbolizer();
            sym6.Strokes.Clear();
            SimpleStroke stroke53 = new SimpleStroke(Color.DarkBlue);
            SimpleStroke stroke54 = new SimpleStroke(Color.LightBlue);
            stroke53.Width = 3;
            sym6.Strokes.Add(stroke53);
            sym6.Strokes.Add(stroke54);
            CustomLineSymbolizer cust6 = new CustomLineSymbolizer();
            cust6.Symbolizer = sym6;
            cust6.UniqueName = "line_0006";
            cust6.Category = "Rivers";
            cust6.Name = "River";
            lst.Add(cust6);

            return lst;
        }
        private static List<CustomSymbolizer> getBasicLineSymbols()
        {
            List<CustomSymbolizer> lst = new List<CustomSymbolizer>();

            LineSymbolizer sym1 = new LineSymbolizer();
            CustomLineSymbolizer cust1 = new CustomLineSymbolizer();
            cust1.Symbolizer = sym1;
            cust1.UniqueName = "line_0001";
            cust1.Category = "default";
            lst.Add(cust1);
            

            LineSymbolizer sym2 = new LineSymbolizer();
            sym2.Strokes.Clear();
            SimpleStroke stroke1 = new SimpleStroke(2.5, Color.Brown);
            sym2.Strokes.Add(stroke1);
            SimpleStroke stroke0 = new SimpleStroke(1.0, Color.Yellow);
            sym2.Strokes.Add(stroke0);
            CustomLineSymbolizer cust2 = new CustomLineSymbolizer();
            cust2.Symbolizer = sym2;
            cust2.UniqueName = "line_0002";
            cust2.Category = "default";
            lst.Add(cust2);

            LineSymbolizer sym3 = new LineSymbolizer();
            sym3.Strokes.Clear();
            CartographicStroke stroke3 = new CartographicStroke(Color.Brown);
            stroke3.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
            sym3.Strokes.Add(stroke3);
            CustomLineSymbolizer cust3 = new CustomLineSymbolizer();
            cust3.Symbolizer = sym3;
            cust3.UniqueName = "line_0003";
            cust3.Category = "travel";
            cust3.Name = "path";
            lst.Add(cust3);
            return lst;
        }
 /// <summary>
 /// Adds a new symbolizer to the control. The added symbolizer will be selected
 /// by default
 /// </summary>
 /// <param name="newSymbolizer">The added custom symbolizer</param>
 public void AddSymbolizer(CustomLineSymbolizer newSymbolizer)
 {
     _symbolizerList.Add(newSymbolizer);
     SelectedIndex = _symbolizerList.Count - 1;
 }