Example #1
0
        private Control getConfigControlBasedOnGeometryType(object dataContextOfConfigControl, bool isConfiguringClassBreak)
        {
            switch (GeometryTypeOfLayer)
            {
            case GeometryType.Point:
                PointSymbolConfigControl pointSymbolConfigControl = new PointSymbolConfigControl()
                {
                    DataContext = dataContextOfConfigControl,
                    MarkerSymbolConfigFileUrl = MarkerSymbolConfigFileUrl,
                    MarkerSymbolDirectory     = MarkerSymbolDirectory,
                };
                return(pointSymbolConfigControl);

            case GeometryType.Polygon:
                FillSymbolConfigControl fillSymbolConfigControl = new FillSymbolConfigControl()
                {
                    DataContext = dataContextOfConfigControl,
                    IsConfiguringClassBreaks = isConfiguringClassBreak,
                };
                return(fillSymbolConfigControl);

            case GeometryType.PolyLine:
                LineSymbolConfigControl lineSymbolConfigControl = new LineSymbolConfigControl()
                {
                    DataContext = dataContextOfConfigControl,
                    IsConfiguringClassBreaks = isConfiguringClassBreak,
                };
                return(lineSymbolConfigControl);
            }
            return(null);
        }
 private Control getConfigControlBasedOnGeometryType(object dataContextOfConfigControl, bool isConfiguringClassBreak)
 {
     switch (GeometryTypeOfLayer)
     {
         case GeometryType.Point:
             PointSymbolConfigControl pointSymbolConfigControl = new PointSymbolConfigControl()
             {
                 DataContext = dataContextOfConfigControl,
                 MarkerSymbolConfigFileUrl = MarkerSymbolConfigFileUrl,
                 MarkerSymbolDirectory = MarkerSymbolDirectory,                        
             };
             return pointSymbolConfigControl;
         case GeometryType.Polygon:
             FillSymbolConfigControl fillSymbolConfigControl = new FillSymbolConfigControl()
             {
                 DataContext = dataContextOfConfigControl,
                 IsConfiguringClassBreaks = isConfiguringClassBreak,
             };
             return fillSymbolConfigControl;
         case GeometryType.PolyLine:
             LineSymbolConfigControl lineSymbolConfigControl = new LineSymbolConfigControl()
             {
                 DataContext = dataContextOfConfigControl,
                 IsConfiguringClassBreaks = isConfiguringClassBreak,
             };
             return lineSymbolConfigControl;
     }
     return null;
 }