Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Core.v4.4 Assembly / Xceed.Chart.Core Namespace / Legend Class / Mode Property
Example


In This Topic
    Mode Property (Legend)
    In This Topic
    Controls the mode of the legend.
    Syntax
    'Declaration
     
    <CategoryAttribute("Content")>
    <DescriptionAttribute("Controls the mode of the legend")>
    <DefaultValueAttribute(Mono.Cecil.CustomAttributeArgument)>
    Public Property Mode As LegendMode
    'Usage
     
    Dim instance As Legend
    Dim value As LegendMode
     
    instance.Mode = value
     
    value = instance.Mode
    [Category("Content")]
    [Description("Controls the mode of the legend")]
    [DefaultValue(Mono.Cecil.CustomAttributeArgument)]
    public LegendMode Mode {get; set;}
    Remarks
    The integrated legend of Xceed Chart for WinForms can operate in three modes - Disabled, Automatic and Manual. In disabled mode the legend is not displayed. When you set the mode to Automatic the legend data is supplied by the series of the associated charts to the legend. In this case you control the displayed legend data items though the SeriesLegend object. In manual mode you can manually feed the legend data items.
    Example
    The following example creates a new legend, sets it in manual mode and adds a new legend data item.
    Dim legend As Legend =  New Legend() 
    legend.Mode = LegendMode.Manual
    ChartControl.Legends.Add(legend)
    Legend legend = new Legend();
    legend.Mode = LegendMode.Manual;
    ChartControl.Legends.Add(legend);
    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