'...
'Create an instance of ImageElement class
Dim imgElem As Neodynamic.SDK.ImageElement
imgElem = Neodynamic.SDK.ImageElement.FromUrl("~/images/nature.jpg")
'Create an instance of TextElement class
Dim txtElem As New Neodynamic.SDK.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.SDK.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.SDK.ImageElement imgElem = Neodynamic.SDK.ImageElement.FromUrl("~/images/nature.jpg");
//Create an instance of TextElement class
Neodynamic.SDK.TextElement txtElem = new Neodynamic.SDK.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.SDK.MailStamp mailStamp = new Neodynamic.SDK.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.