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


In This Topic
    HorizontalMargin Property (Legend)
    In This Topic
    The horizontal margin of the legend in percents of the control view area width.
    Syntax
    'Declaration
     
    <CategoryAttribute("Position")>
    <DescriptionAttribute("The horizontal margin of the legend in percents of the control view area width")>
    <DefaultValueAttribute(98)>
    Public Property HorizontalMargin As Integer
    'Usage
     
    Dim instance As Legend
    Dim value As Integer
     
    instance.HorizontalMargin = value
     
    value = instance.HorizontalMargin
    [Category("Position")]
    [Description("The horizontal margin of the legend in percents of the control view area width")]
    [DefaultValue(98)]
    public int HorizontalMargin {get; set;}
    Remarks
    The legend position is controlled with the help of the HorizontalMargin, VerticalMargin, HorzAlign and VertAlign properties of the Legend object. The first two define the margins of the legend in percents of the control window dimensions and the latter two how the legend should align to the margins.
    Example
    The following example positions the legend at the top of the control window.
    legend.HorzAlign = HorzAlign.Center
    legend.VertAlign = VertAlign.Top
    legend.HorizontalMargin = 50
    legend.VerticalMargin = 3
    legend.HorzAlign = HorzAlign.Center;
    legend.VertAlign = VertAlign.Top;
    legend.HorizontalMargin = 50;
    legend.VerticalMargin = 3;
    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