Stroke Class
<< Click to Display Table of Contents >> Stroke Class |
Objects derived from the Stroke class are used to characterize how a plot is visually displayed (plotted) on a chart.
Stroke(Stroke stroke)
Stroke(Brush brush)
Stroke(Brush brush, float width)
Stroke(Brush brush, DashStyle dashStyleHelper, float width)
brush |
The brush used to draw the plot (reference) |
dashStyleHelper |
Possible values:
DashStyleHelper.Dash DashStyleHelper.DashDot DashStyleHelper.DashDotDot DashStyleHelper.Dot DashStyleHelper.Solid |
stroke |
The stroke object |
width |
The width of the stroke |
Brush |
The System.Windows.Media.Brush used to construct the stroke (reference) |
BrushDX |
A SharpDX.Direct2D1.Brush used to actually render the stroke
Note: To avoid and resolve access violation exceptions, please see Warning and examples remarked below |
DashStyleDX |
A SharpDX.Direct2D1.DashStyle used to render the stroke style
Note: To avoid and resolve access violation exceptions, please see Warning and examples remarked below |
DashStyleHelper |
A dashstyle used to construct the stroke. Possible values are:
•DashStyleHelper.Dash •DashStyleHelper.DashDot •DashStyleHelper.DashDotDot •DashStyleHelper.Dot •DashStyleHelper.Solid |
RenderTarget |
The RenderTarget drawing context used for the stroke.
Note: This property must be set before accessing a stroke's BrushDX property. Please see Warning and examples remarked below |
StrokeStyle |
|
Width |
A float representing the width in pixels |
Warning: There may be situations where a RenderTarget has not been set, and to prevent access violation exception before accessing the BrushDX or DashStyleDX properties, you should explicitly set the RenderTarget before attempting to access that property. Please see the example below. |
See the AddPlot() method for additional examples.
Using a Stroke SharpDX Brush for Custom Rendering |
---|
protected override void OnStateChange() |
Convert the Windows Media Brush to a SharpDX Brush |
---|
protected override void OnStateChange() |