{
//Note: Must be on QueuedTask.Run(() => { ...
//Build geometry
Coordinate2D ll = new Coordinate2D(0.5, 1);
Coordinate2D ur = new Coordinate2D(2.5, 2);
Envelope env = EnvelopeBuilderEx.CreateEnvelope(ll, ur);
//Create and add element to layout
string picPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures),
"SamplePicture.jpg");
var pic_gr = ElementFactory.Instance.CreatePictureGraphicElement(
layout, env.Center, picPath, "New Picture", true, new ElementInfo() { Anchor = Anchor.CenterPoint });
}