ComponentOne Chart for WPF and Silverlight
Chart for WPF and Silverlight / Chart Features / Chart Legend / Hiding Legend
In This Topic
    Hiding Legend
    In This Topic

    To programmatically hide the chart legend you can do the following:

    Add name to the legend in xaml and then you can change its visibility in code: legend.Visibility = ...

    XAML
    Copy Code
    <c1chart:C1Chart x:Name="chart" >
        <c1chart:C1ChartLegend x:Name="legend"  />
        ...
     </c1chart:C1Chart>
    

    See Also