Hello,
Using WPF application, I want to embedded image from GeoImage() class using an embedded resource ??and I went on to image properties and set image to ( BuildAction -> Action(Embedded Resource).The goal I want to achieve is to read GeoImage() icon path from the Executable file.
I tried several different ways, and I was unsuccessful with below scenarios.
Dictionary<String, GeoImage> _dictImage;
Way1:
_dictImage.Add("PickupIncomplete", new GeoImage("C:\images\PickupIncomplete.png"));
Way2:
_dictImage.Add("PickupIncomplete", new GeoImage("pack://application:,,,/testproject;component/\images\PickupIncomplete.png"));
protected override void DrawCore(IEnumerable<Feature> features, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)
{
foreach (Feature feature in features)
{
if (_dictImage.ContainsKey(srchVal))
{
canvas.DrawWorldImageWithoutScaling(_dictImage[srchVal], pointShape.X, pointShape.Y, DrawingLevel.LevelFour, 0, 0, 0);
}
else
{
if (_dictImage.ContainsKey(feature.ColumnValues[LayerColNames._FeatureStyle]))
{
canvas.DrawWorldImageWithoutScaling(_dictImage[feature.ColumnValues[LayerColNames._FeatureStyle]], pointShape.X, pointShape.Y, DrawingLevel.LevelFour, 0, 0, 0);
}
}
}
}
Can you recommend any possible ways