Border Property

Use this property to return/set values that determines the chart control's border characteristics.  Border uses the Line Class set of properties for its characteristics.

[Visual Basic]
Property Border() As C_Line
[C#]
XYChartNet.XYChartNETCtl.C_Line XYChartNETCtl.Border
[C++]
__property XYChartNet::XYChartNETCtl::C_Line __gc *XYChartNet::XYChartNETCtl::Border

Remarks

LineOption default for Border property is loNone.

Example

XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

[Visual Basic]
Dim tmpColor As Color
Dim iWidth As Integer
Dim iStyle As Integer

If XYChartNETCtl1.Border.LineOption = loCustom Then
   iStyle = XYChartNETCtl1.Border.LineStyle    'Return the chart's border style
   iWidth = XYChartNETCtl1.Border.LineWidth    'Return the chart's border width
   tmpColor = XYChartNETCtl1.Border.LineColor  'Return the chart's border color
End If

XYChartNETCtl1.Border.LineOption = loNone      'Do not display border around the chart control

With XYChartNETCtl1.Border
   .LineOption = loCustom                      'Display border around the chart
   .LineColor = Color.Red                      'Set the chart's border color to Red
   .LineWidth = woFivePoint                    'Set the chart's border width
   .LineStyle = soDashDot                      'Set the chart's border style to use Dash-Dots
End With

XYChartNETCtl1.Refresh                         'Refresh required to update chart with changes made

[C#]
System.Drawing.Color tmpColor;
int iWidth;
int iStyle;

tmpColor = XYChartNETCtl1.Border.LineColor;      //Return the chart's border color
iWidth = (int) XYChartNETCtl1.Border.LineWidth;  //Return the chart's border width
iStyle = (int) XYChartNETCtl1.Border.LineStyle;  //Return the chart's border style

//Display a red border around the chart
XYChartNETCtl1.Border.LineOption = XYChartNet.XYChartNETCtl.LineOptions.loCustom;
XYChartNETCtl1.Border.LineColor = Color.Red;
XYChartNETCtl1.Border.LineWidth = XYChartNet.XYChartNETCtl.WidthOptions.woFivePoint;
XYChartNETCtl1.Border.LineStyle = XYChartNet.XYChartNETCtl.StyleOptions.soDot;

XYChartNETCtl1.Refresh();                       //Refresh required to update chart with changes made

[C++]
Drawing::Color tmpColor;
int iWidth;
int iStyle;

tmpColor = XYChartNETCtl1->Border->LineColor;  //Return the chart's border color
iWidth = XYChartNETCtl1->Border->LineWidth;    //Return the chart's border width
iStyle = XYChartNETCtl1->Border->LineStyle;    //Return the chart's border style

//Display a red border around the chart
XYChartNETCtl1->Border->LineOption = XYChartNet::XYChartNETCtl::LineOptions::loCustom;
XYChartNETCtl1->Border->LineColor = Color::Red;
XYChartNETCtl1->Border->LineWidth = XYChartNet::XYChartNETCtl::WidthOptions::woFivePoint;
XYChartNETCtl1->Border->LineStyle = XYChartNet::XYChartNETCtl::StyleOptions::soDot;

XYChartNETCtl1->Refresh();                     //Refresh required to update chart with changes made

See Also

Properties