'...
'Create an instance of ImageElement class
Dim imgElem As Neodynamic.WebControls.ImageDraw.ImageElement
imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("~/images/nature.jpg")
'Create an instance of TextElement class
Dim txtElem As New Neodynamic.WebControls.ImageDraw.TextElement
txtElem.Font.Name = "Arial"
txtElem.Font.Size = 20.25F
txtElem.Font.Bold = True
txtElem.ForeColor = System.Drawing.Color.MidnightBlue
txtElem.StrokeColor = System.Drawing.Color.White
txtElem.StrokeWidth = 3
txtElem.Text = "63"
txtElem.X = 15
txtElem.Y = 110
'Create an instance of MailStamp class
Dim mailStamp As New Neodynamic.WebControls.ImageDraw.MailStamp()
mailStamp.Width = 150
mailStamp.ImageBorderColor = System.Drawing.Color.Transparent
mailStamp.ImagePadding.Left = 10
mailStamp.ImagePadding.Top = 10
mailStamp.ImagePadding.Right = 10
mailStamp.ImagePadding.Bottom = 10
'Apply the action on the ImageElement
imgElem.Actions.Add(mailStamp)
'Add the ImageElement to the Elements collection of the ImageDraw control
Me.ImageDraw1.Elements.Add(imgElem)
Me.ImageDraw1.Elements.Add(txtElem)
'...
//...
//Create an instance of ImageElement class
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("~/images/nature.jpg");
//Create an instance of TextElement class
Neodynamic.WebControls.ImageDraw.TextElement txtElem = new Neodynamic.WebControls.ImageDraw.TextElement();
txtElem.Font.Name = "Arial";
txtElem.Font.Size = 20.25f;
txtElem.Font.Bold = true;
txtElem.ForeColor = System.Drawing.Color.MidnightBlue;
txtElem.StrokeColor = System.Drawing.Color.White;
txtElem.StrokeWidth = 3;
txtElem.Text = "63";
txtElem.X = 15;
txtElem.Y = 110;
//Create an instance of MailStamp class
Neodynamic.WebControls.ImageDraw.MailStamp mailStamp = new Neodynamic.WebControls.ImageDraw.MailStamp();
mailStamp.Width = 150;
mailStamp.ImageBorderColor = System.Drawing.Color.Transparent;
mailStamp.ImagePadding.Left = 10;
mailStamp.ImagePadding.Top = 10;
mailStamp.ImagePadding.Right = 10;
mailStamp.ImagePadding.Bottom = 10;
//Apply the action on the ImageElement
imgElem.Actions.Add(mailStamp);
//Add the ImageElement to the Elements collection of the ImageDraw controlthis.ImageDraw1.Elements.Add(imgElem);
this.ImageDraw1.Elements.Add(txtElem);
//...
This action creates a mail stamp representation of an Element. This action might typically used when showing photos or stamps in Personal Websites for example.
You can manage each component of the mail stamp through simple properties or attributes.
In the following example we have an ImageElement and a TextElement on the Canvas and a MailStamp action is applied on the ImageElement.
ImageElement before the action is applied.
ImageElement with MailStamp action applied on it.
ImageElement with MailStamp action applied on it. No padding is set in this case.