/// <summary> /// Method for applying the selected character to the point feature layer /// </summary> /// <returns></returns> private async Task ApplyFontAsMarker() { var charIndex = 0; charIndex = SelectedCharacter.Character; var fontName = SelectedFontFamily.ToString(); var styleName = SelectedTypeFace.ToString(); if (MapView.Active != null) { GetSelectedPointFeatureLayer(); //the selected point feature layer in the TOC } var cimMarker = SymbolFactory.Instance.ConstructMarker(charIndex, fontName, styleName, Size); //creating the marker from the Font selected var pointSymbolFromMarker = SymbolFactory.Instance.ConstructPointSymbol(cimMarker); //create a symbol from the marker await SetFeatureLayerSymbolAsync(PointFeatureLayer, pointSymbolFromMarker); if (IsFavorites) { await CreateStyleItem(); if (FontMarkerStyleProjectItem != null && pointSymbolFromMarker != null && !FontMarkerStyleProjectItem.IsReadOnly) { await AddStyleItemToStyle(FontMarkerStyleProjectItem, pointSymbolFromMarker); //selected marker is added to the FontMarker style } } }
/// <summary> /// Method for applying the selected character to the point feature layer /// </summary> /// <returns></returns> private async Task ApplyFontAsMarker() { var charIndex = 0; charIndex = SelectedCharacter.Character; var fontName = SelectedFontFamily.ToString(); var styleName = SelectedTypeFace.ToString(); if (MapView.Active != null) { GetSelectedPointFeatureLayer(); //the selected point feature layer in the TOC } var cimMarker = SymbolFactory.ConstructMarker(charIndex, fontName, styleName, Size); //creating the marker from the Font selected var pointSymbolFromMarker = SymbolFactory.ConstructPointSymbol(cimMarker); //create a symbol from the marker await SetFeatureLayerSymbolAsync(PointFeatureLayer, pointSymbolFromMarker); }