Nevron .NET Vision
Nevron.Chart Namespace / NContentPanel Class / BoundsMode Property
Example


In This Topic
    BoundsMode Property
    In This Topic
    Defines the mode used to fit the panel contents into the panel bounds.
    Syntax
    'Declaration
     
    
    <System.ComponentModel.CategoryAttribute("Panel")>
    <System.ComponentModel.DescriptionAttribute("Defines the mode used to fit the panel contents into the panel bounds.")>
    <System.ComponentModel.DefaultValueAttribute(Mono.Cecil.CustomAttributeArgument)>
    <System.Xml.Serialization.XmlAttributeAttribute()>
    Public Property BoundsMode As BoundsMode
    'Usage
     
    
    Dim instance As NContentPanel
    Dim value As BoundsMode
     
    instance.BoundsMode = value
     
    value = instance.BoundsMode
    [System.ComponentModel.Category("Panel")]
    [System.ComponentModel.Description("Defines the mode used to fit the panel contents into the panel bounds.")]
    [System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)]
    [System.Xml.Serialization.XmlAttribute()]
    public BoundsMode BoundsMode {get; set;}
    Remarks
    The possible values for this property are BoundsMode.None, BoundsMode.Stretch and BoundsMode.Fit.
    • None - the panel will not try to align the contents to the panel bounds.
    • Fit - the panel will stretch the contents along X and Y in order to fill as much as possible of the panel area preserving the contents proportions.
    • Stretch - the panel will stretch the contents along X and Y in order to fill as much as possible of the panel area without breaking outside. This bounds mode does not preserve the panel contents proportions.
    Example
    The following code modifies the chart bounds mode and chart margins:
    Dim chart As NChart = CType(nChartControl1.Charts.GetAt(0), NChart)
    chart.BoundsMode = BoundsMode.Stretch
    chart.View.SetPredefinedProjection(PredefinedProjection.Orthogonal)
    NChart chart = nChartControl1.Charts[0];
    chart.BoundsMode = BoundsMode.Stretch;
    chart.View.SetPredefinedProjection(PredefinedProjection.Orthogonal);
    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