'...
'Create an instance of ImageElement class
Dim imgElem As Neodynamic.WebControls.ImageDraw.ImageElement
imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("~/images/night.jpg")
'Create an instance of DecorativeBorder class
Dim decoBorder As New Neodynamic.WebControls.ImageDraw.DecorativeBorder()
decoBorder.Width = 15
decoBorder.Fill.Type = Neodynamic.WebControls.ImageDraw.FillType.Pattern
decoBorder.Fill.Pattern = System.Drawing.Drawing2D.HatchStyle.HorizontalBrick
decoBorder.Fill.ForegroundColor = System.Drawing.Color.Crimson
decoBorder.Fill.BackgroundColor = System.Drawing.Color.SeaShell
'Apply the action on the ImageElement
imgElem.Actions.Add(decoBorder)
'Add the ImageElement to the Elements collection of the ImageDraw control
Me.ImageDraw1.Elements.Add(imgElem)
'...
//...
//Create an instance of ImageElement class
Neodynamic.WebControls.ImageDraw.ImageElement imgElem = Neodynamic.WebControls.ImageDraw.ImageElement.FromUrl("~/images/night.jpg");
//Create an instance of DecorativeBorder class
Neodynamic.WebControls.ImageDraw.DecorativeBorder decoBorder = new Neodynamic.WebControls.ImageDraw.DecorativeBorder();
decoBorder.Width = 15;
decoBorder.Fill.Type = Neodynamic.WebControls.ImageDraw.FillType.Pattern;
decoBorder.Fill.Pattern = System.Drawing.Drawing2D.HatchStyle.HorizontalBrick;
decoBorder.Fill.ForegroundColor = System.Drawing.Color.Crimson;
decoBorder.Fill.BackgroundColor = System.Drawing.Color.SeaShell;
//Apply the action on the ImageElement
imgElem.Actions.Add(decoBorder);
//Add the ImageElement to the Elements collection of the ImageDraw controlthis.ImageDraw1.Elements.Add(imgElem);
//...
This action adds decorative border to an Element. The decorative border is specified by setting a border width, a dash style and a Fill – which can be set by a Visual Fill Editor at design-time.
In the following example we have an ImageElement on the Canvas and a DecorativeBorder action is applied on the ImageElement.
ImageElement before the action is applied.
ImageElement with DecorativeBorder action applied on it.