protected CIMSymbolReference SketchSymbol {get; set;}
Protected Property SketchSymbol As CIMSymbolReference
protected CIMSymbolReference SketchSymbol {get; set;}
Protected Property SketchSymbol As CIMSymbolReference
internal class SketchTool_WithSymbol : MapTool { public SketchTool_WithSymbol() { IsSketchTool = true; SketchOutputMode = SketchOutputMode.Map; //Changing the Sketch Symbol is only supported with map sketches. SketchType = SketchGeometryType.Rectangle; } protected override Task OnToolActivateAsync(bool hasMapViewChanged) { return QueuedTask.Run(() => { //Set the Sketch Symbol if it hasn't already been set. if (SketchSymbol != null) return; var polygonSymbol = SymbolFactory.Instance.ConstructPolygonSymbol(ColorFactory.Instance.CreateRGBColor(24, 69, 59), SimpleFillStyle.Solid, SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.BlackRGB, 1.0, SimpleLineStyle.Dash)); SketchSymbol = polygonSymbol.MakeSymbolReference(); }); } }
internal class SketchTool_WithSymbol : MapTool { public SketchTool_WithSymbol() { IsSketchTool = true; SketchOutputMode = SketchOutputMode.Map; //Changing the Sketch Symbol is only supported with map sketches. SketchType = SketchGeometryType.Rectangle; } protected override Task OnToolActivateAsync(bool hasMapViewChanged) { return QueuedTask.Run(() => { //Set the Sketch Symbol if it hasn't already been set. if (SketchSymbol != null) return; var polygonSymbol = SymbolFactory.Instance.ConstructPolygonSymbol(ColorFactory.Instance.CreateRGBColor(24, 69, 59), SimpleFillStyle.Solid, SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.BlackRGB, 1.0, SimpleLineStyle.Dash)); SketchSymbol = polygonSymbol.MakeSymbolReference(); }); } }
Target Platforms: Windows 11, Windows 10, Windows 8.1