Dashed lines can be used when drawing straight lines, polylines, polygons, and pen objects by setting the DashStyle property. Multiple types of dashed line are possible.
You can set the DashStyle property to DashStyle.Custom and define custom dash patterns using the DashPattern property to draw custom dashed line patterns. Additionally, these settings can be modified even after drawing using the SelectedObjectDashStyle and SelectedObjectDashPattern properties.
How to draw a dashed line with DashStyle: DashDotDot
How to draw a dashed line with custom DashStyle: { 2.0F, 1.0F, 2.0F, 1.0F, 2.0F, 2.0F }
Example Code
Set the polyline dashed line style to "DashDotDot":
The same thing can be done using Toolbar Controls. See Using Toolbars section for information on the toolbar.
[Visual Basic.NET]
ImageKit1.Edit.EditEnabled = True
'Set the object to polyline
ImageKit1.Edit.EditKind = Newtone.ImageKit.Win.KindOfEdit.Polyline
ImageKit1.Edit.PenWidth = 10
ImageKit1.Edit.ForeColor = Color.Red
'Set the line style
ImageKit1.Edit.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot
'After this, draw a polyline with the mouse or method
[Visual C#.NET]
ImageKit1.Edit.EditEnabled = true;
//Set the object to polyline
ImageKit1.Edit.EditKind = Newtone.ImageKit.Win.KindOfEdit.Polyline;
ImageKit1.Edit.PenWidth = 10;
ImageKit1.Edit.ForeColor = Color.Red;
//Set the line style
ImageKit1.Edit.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;
//After this, draw a polyline with the mouse or method
Relevant Properties
ImageKit.Edit.DashStyle
ImageKit.Edit.DashPattern
ImageKit.Edit.SelectedObjectDashStyle
ImageKit.Edit.SelectedObjectDashPattern
Reference Sample Project
\Examples\WinForm\CSharp or VB.NETAnnotation Samples\EditToolBar