public static ESRI.ArcGIS.Mapping.Core.Symbols.ImageFillSymbol ToImageFillSymbol( ESRI.ArcGIS.Client.FeatureService.Symbols.PictureMarkerSymbol pms) { if (pms != null) { Symbols.ImageFillSymbol symbol = SymbolFromJson(pms.ToJson()) as Symbols.ImageFillSymbol; if (string.IsNullOrEmpty(symbol.ImageData) && string.IsNullOrEmpty(symbol.Source)) { string imageData = SymbolExtensions.GetImageData(pms); string source; if (string.IsNullOrEmpty(symbol.ImageData) && !string.IsNullOrEmpty(imageData)) { symbol.ImageData = imageData; } else if (string.IsNullOrEmpty(symbol.Source) && !string.IsNullOrEmpty(source = SymbolExtensions.GetImageUrl(pms))) { symbol.Source = source; } } return(symbol); } return(null); }
private static void OnFillChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ImageFillSymbol dp = d as ImageFillSymbol; if (dp != null) { dp.OnPropertyChanged("Fill"); } }
private void changeCursorForSymbol(Symbol symbol, bool isClickableCursor) { if (symbol == null) { return; } ESRI.ArcGIS.Mapping.Core.Symbols.ImageFillSymbol imageFillSymbol = symbol as ESRI.ArcGIS.Mapping.Core.Symbols.ImageFillSymbol; if (imageFillSymbol != null) { imageFillSymbol.CursorName = isClickableCursor ? "Hand" : "Arrow"; } }