Xceed Chart for WinForms v4.4 Documentation
MarkLineProps Property
Example 


Xceed.Chart.Core.v4.4 Assembly > Xceed.Chart.Core Namespace > LegendDataItem Class : MarkLineProps Property
The line properties of the border around the legend item mark.
Syntax
'Declaration
 
<DescriptionAttribute("The line properties of the border around the legend item mark.")>
<CategoryAttribute("General")>
Public Property MarkLineProps As LineProperties
'Usage
 
Dim instance As LegendDataItem
Dim value As LineProperties
 
instance.MarkLineProps = value
 
value = instance.MarkLineProps
[Description("The line properties of the border around the legend item mark.")]
[Category("General")]
public LineProperties MarkLineProps {get; set;}
Remarks
Some mark shapes do not have filling (star, cross etc). For these mark shapes only the MarkLineProps determine the appearance. The default is solid black line with width 1.
Example
The following examples adds a new item to the legend and changes the line properties.
Dim legend As Legend = CType(NChartControl.Legends(0), Legend)
legend.Mode = LegendMode.Manual

Dim item As LegendDataItem =  New LegendDataItem() 
item.Text = "New item"
item.MarkShape = LegendMarkShape.Cross
item.MarkLineProps.Width = 2
item.MarkLineProps.Color = Color.Red

legend.Data.Array.Add(item)
Legend legend = (Legend)NChartControl.Legends[0];
legend.Mode = LegendMode.Manual;

LegendDataItem item = new LegendDataItem();
item.Text = "New item";
item.MarkShape = LegendMarkShape.Cross;
item.MarkLineProps.Width = 2;
item.MarkLineProps.Color = Color.Red;

legend.Data.Array.Add(item);
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

LegendDataItem Class
LegendDataItem Members