Search Results for

    Show / Hide Table of Contents

    Class MasterPane

    A collection class containing a list of GraphPane objects organized together in some form.

    Inheritance
    Object
    PaneBase
    MasterPane
    Implements
    ICloneable
    ISerializable
    IDeserializationCallback
    Inherited Members
    PaneBase._rect
    PaneBase._title
    PaneBase._legend
    PaneBase._tag
    PaneBase._isFontsScaled
    PaneBase._isPenWidthScaled
    PaneBase._fill
    PaneBase._border
    PaneBase._graphObjList
    PaneBase._baseDimension
    PaneBase._titleGap
    PaneBase.Rect
    PaneBase.Legend
    PaneBase.Title
    PaneBase.Tag
    PaneBase.Border
    PaneBase.Fill
    PaneBase.GraphObjList
    PaneBase.Margin
    PaneBase.BaseDimension
    PaneBase.TitleGap
    PaneBase.IsFontsScaled
    PaneBase.IsPenWidthScaled
    PaneBase.ShallowClone()
    PaneBase.schema
    PaneBase.CalcClientRect(Graphics, Single)
    PaneBase.DrawPaneFrame(Graphics, Single)
    PaneBase.DrawTitle(Graphics, Single)
    PaneBase.CalcScaleFactor()
    PaneBase.ScaledPenWidth(Single, Single)
    PaneBase.GetImage()
    PaneBase.GetImage(Boolean)
    PaneBase.GetImage(Int32, Int32, Single, Boolean)
    PaneBase.GetImage(Int32, Int32, Single)
    PaneBase.GetMetafile(Int32, Int32, Boolean)
    PaneBase.GetMetafile(Int32, Int32)
    PaneBase.GetMetafile()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: ZedGraph
    Assembly: ZedGraph.dll
    Syntax
    [Serializable]
    public class MasterPane : PaneBase, ICloneable, ISerializable, IDeserializationCallback

    Constructors

    | Improve this Doc View Source

    MasterPane()

    Default constructor for the class. Sets the Rect to (0, 0, 500, 375).

    Declaration
    public MasterPane()
    | Improve this Doc View Source

    MasterPane(SerializationInfo, StreamingContext)

    Constructor for deserializing objects

    Declaration
    protected MasterPane(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    SerializationInfo info

    A SerializationInfo instance that defines the serialized data

    StreamingContext context

    A StreamingContext instance that contains the serialized data

    | Improve this Doc View Source

    MasterPane(String, RectangleF)

    Default constructor for the class. Specifies the Title of the MasterPane, and the size of the Rect.

    Declaration
    public MasterPane(string title, RectangleF paneRect)
    Parameters
    Type Name Description
    String title
    RectangleF paneRect
    | Improve this Doc View Source

    MasterPane(MasterPane)

    The Copy Constructor - Make a deep-copy clone of this class instance.

    Declaration
    public MasterPane(MasterPane rhs)
    Parameters
    Type Name Description
    MasterPane rhs

    The MasterPane object from which to copy

    Fields

    | Improve this Doc View Source

    schema2

    Current schema value that defines the version of the serialized file

    Declaration
    public const int schema2 = 11
    Field Value
    Type Description
    Int32

    Properties

    | Improve this Doc View Source

    InnerPaneGap

    Gets or sets the size of the margin between adjacent GraphPane objects.

    Declaration
    public float InnerPaneGap { get; set; }
    Property Value
    Type Description
    Single

    The value is in points (1/72nd inch).

    Remarks

    This property is scaled according to CalcScaleFactor(), based on BaseDimension. The default value comes from InnerPaneGap.

    | Improve this Doc View Source

    IsAntiAlias

    Gets or sets a value that determines if all drawing operations for this MasterPane will be forced to operate in Anti-alias mode. Note that if this value is set to "true", it overrides the setting for sub-objects. Otherwise, the sub-object settings (such as IsAntiAlias) will be honored.

    Declaration
    public bool IsAntiAlias { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsCommonScaleFactor

    Gets or sets a value that determines if the DoLayout(Graphics) method will automatically set the BaseDimension of each GraphPane in the PaneList such that the scale factors have the same value.

    Declaration
    public bool IsCommonScaleFactor { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    The scale factors, calculated by CalcScaleFactor(), determine scaled font sizes, tic lengths, etc. This function will insure that for multiple graphpanes, a certain specified font size will be the same for all the panes.

    See Also
    SetLayout(Graphics, PaneLayout)
    SetLayout(Graphics, Int32, Int32)
    SetLayout(Graphics, Boolean, Int32[])
    SetLayout(Graphics, Boolean, Int32[], Single[])
    ReSize(Graphics, RectangleF)
    | Improve this Doc View Source

    IsUniformLegendEntries

    Gets or set the value of the IsUniformLegendEntries

    Declaration
    public bool IsUniformLegendEntries { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Item[Int32]

    Indexer to access the specified GraphPane object from PaneList by its ordinal position in the list.

    Declaration
    public GraphPane this[int index] { get; set; }
    Parameters
    Type Name Description
    Int32 index

    The ordinal position (zero-based) of the GraphPane object to be accessed.

    Property Value
    Type Description
    GraphPane

    A GraphPane object reference.

    | Improve this Doc View Source

    Item[String]

    Indexer to access the specified GraphPane object from PaneList by its Title string.

    Declaration
    public GraphPane this[string title] { get; }
    Parameters
    Type Name Description
    String title

    The string title of the GraphPane object to be accessed.

    Property Value
    Type Description
    GraphPane

    A GraphPane object reference.

    | Improve this Doc View Source

    PaneList

    Gets or sets the PaneList collection instance that holds the list of GraphPane objects that are included in this MasterPane.

    Declaration
    public PaneList PaneList { get; set; }
    Property Value
    Type Description
    PaneList
    See Also
    Add(GraphPane)
    Item[Int32]

    Methods

    | Improve this Doc View Source

    Add(GraphPane)

    Add a GraphPane object to the PaneList collection at the end of the list.

    Declaration
    public void Add(GraphPane pane)
    Parameters
    Type Name Description
    GraphPane pane

    A reference to the GraphPane object to be added

    See Also
    Add(Object)
    | Improve this Doc View Source

    AxisChange()

    Call AxisChange() for all GraphPane objects in the PaneList list.

    Declaration
    public void AxisChange()
    Remarks

    This overload of AxisChange just uses a throw-away bitmap as Graphics. If you have a Graphics instance available from your Windows Form, you should use the AxisChange(Graphics) overload instead.

    | Improve this Doc View Source

    AxisChange(Graphics)

    Call AxisChange() for all GraphPane objects in the PaneList list.

    Declaration
    public void AxisChange(Graphics g)
    Parameters
    Type Name Description
    Graphics g

    A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method.

    | Improve this Doc View Source

    Clone()

    Typesafe, deep-copy clone method.

    Declaration
    public MasterPane Clone()
    Returns
    Type Description
    MasterPane

    A new, independent copy of this class

    | Improve this Doc View Source

    CommonScaleFactor()

    Method that forces the scale factor calculations (via CalcScaleFactor()), to give a common scale factor for all GraphPane objects in the PaneList.

    Declaration
    public void CommonScaleFactor()
    Remarks

    This will make it such that a given font size will result in the same output font size for all GraphPane's. Note that this does not make the scale factor for the GraphPane's the same as that of the MasterPane.

    See Also
    IsCommonScaleFactor
    | Improve this Doc View Source

    DoLayout(Graphics)

    Modify the GraphPane Rect sizes of each GraphPane such that they fit within the MasterPane in a pre-configured layout.

    Declaration
    public void DoLayout(Graphics g)
    Parameters
    Type Name Description
    Graphics g
    Remarks

    The SetLayout(Graphics, PaneLayout) method (and overloads) is used for setting the layout configuration.

    See Also
    SetLayout(Graphics, PaneLayout)
    SetLayout(Graphics, Int32, Int32)
    SetLayout(Graphics, Boolean, Int32[])
    SetLayout(Graphics, Boolean, Int32[], Single[])
    | Improve this Doc View Source

    Draw(Graphics)

    Render all the GraphPane objects in the PaneList to the specified graphics device.

    Declaration
    public override void Draw(Graphics g)
    Parameters
    Type Name Description
    Graphics g

    A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method.

    Overrides
    PaneBase.Draw(Graphics)
    Remarks

    This method should be part of the Paint() update process. Calling this routine will redraw all features of all the GraphPane items. No preparation is required other than instantiated GraphPane objects that have been added to the list with the Add(GraphPane) method.

    | Improve this Doc View Source

    FindChartRect(PointF)

    Find the GraphPane within the PaneList that contains the within its Rect.

    Declaration
    public GraphPane FindChartRect(PointF mousePt)
    Parameters
    Type Name Description
    PointF mousePt

    The mouse point location where you want to search

    Returns
    Type Description
    GraphPane

    A GraphPane object that contains the mouse point, or null if no GraphPane was found.

    | Improve this Doc View Source

    FindNearestPaneObject(PointF, Graphics, out GraphPane, out Object, out Int32)

    Find the pane and the object within that pane that lies closest to the specified mouse (screen) point.

    Declaration
    public bool FindNearestPaneObject(PointF mousePt, Graphics g, out GraphPane pane, out object nearestObj, out int index)
    Parameters
    Type Name Description
    PointF mousePt

    The screen point, in pixel coordinates.

    Graphics g

    A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method.

    GraphPane pane

    A reference to the GraphPane object that was clicked.

    Object nearestObj

    A reference to the nearest object to the specified screen point. This can be any of Axis, Legend, Title, TextObj, ArrowObj, or CurveItem. Note: If the pane title is selected, then the GraphPane object will be returned.

    Int32 index

    The index number of the item within the selected object (where applicable). For example, for a CurveItem object, will be the index number of the nearest data point, accessible via Points. index will be -1 if no data points are available.

    Returns
    Type Description
    Boolean

    true if a GraphPane was found, false otherwise.

    Remarks

    This method first finds the GraphPane within the list that contains the specified mouse point. It then calls the FindNearestObject(PointF, Graphics, out Object, out Int32) method to determine which object, if any, was clicked. With the exception of the , all the parameters in this method are identical to those in the FindNearestObject(PointF, Graphics, out Object, out Int32) method. If the mouse point lies within the Rect of any GraphPane item, then that pane will be returned (otherwise it will be null). Further, within the selected pane, if the mouse point is within the bounding box of any of the items (or in the case of ArrowObj and CurveItem, within NearestTol pixels), then the object will be returned. You must check the type of the object to determine what object was selected (for example, "if ( object is Legend ) ..."). The parameter returns the index number of the item within the selected object (such as the point number within a CurveItem object.

    See Also
    FindNearestObject(PointF, Graphics, out Object, out Int32)
    | Improve this Doc View Source

    FindPane(PointF)

    Find the GraphPane within the PaneList that contains the within its Rect.

    Declaration
    public GraphPane FindPane(PointF mousePt)
    Parameters
    Type Name Description
    PointF mousePt

    The mouse point location where you want to search

    Returns
    Type Description
    GraphPane

    A GraphPane object that contains the mouse point, or null if no GraphPane was found.

    | Improve this Doc View Source

    GetObjectData(SerializationInfo, StreamingContext)

    Populates a SerializationInfo instance with the data needed to serialize the target object

    Declaration
    [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
    public override void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    SerializationInfo info

    A SerializationInfo instance that defines the serialized data

    StreamingContext context

    A StreamingContext instance that contains the serialized data

    Overrides
    PaneBase.GetObjectData(SerializationInfo, StreamingContext)
    | Improve this Doc View Source

    OnDeserialization(Object)

    Respond to the callback when the MasterPane objects are fully initialized.

    Declaration
    public void OnDeserialization(object sender)
    Parameters
    Type Name Description
    Object sender
    | Improve this Doc View Source

    ReSize(Graphics)

    Redo the layout using the current size of the Rect, and also handle resizing the contents by calling DoLayout(Graphics).

    Declaration
    public void ReSize(Graphics g)
    Parameters
    Type Name Description
    Graphics g

    A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method.

    Remarks

    This method will use the pane layout that was specified by a call to SetLayout(Graphics, PaneLayout). If SetLayout(Graphics, PaneLayout) has not previously been called, it will default to PaneLayout.

    See Also
    SetLayout(Graphics, PaneLayout)
    SetLayout(Graphics, Int32, Int32)
    SetLayout(Graphics, Boolean, Int32[])
    SetLayout(Graphics, Boolean, Int32[], Single[])
    | Improve this Doc View Source

    ReSize(Graphics, RectangleF)

    Change the size of the Rect, and also handle resizing the contents by calling DoLayout(Graphics).

    Declaration
    public override void ReSize(Graphics g, RectangleF rect)
    Parameters
    Type Name Description
    Graphics g

    A graphic device object to be drawn into. This is normally e.Graphics from the PaintEventArgs argument to the Paint() method.

    RectangleF rect
    Overrides
    PaneBase.ReSize(Graphics, RectangleF)
    Remarks

    This method will use the pane layout that was specified by a call to SetLayout(Graphics, PaneLayout). If SetLayout(Graphics, PaneLayout) has not previously been called, it will default to PaneLayout.

    See Also
    SetLayout(Graphics, PaneLayout)
    SetLayout(Graphics, Int32, Int32)
    SetLayout(Graphics, Boolean, Int32[])
    SetLayout(Graphics, Boolean, Int32[], Single[])
    | Improve this Doc View Source

    SetLayout(Graphics, Boolean, Int32[])

    Automatically set all of the GraphPane Rect's in the list to the specified configuration.

    Declaration
    public void SetLayout(Graphics g, bool isColumnSpecified, int[] countList)
    Parameters
    Type Name Description
    Graphics g

    A graphic device object to be drawn into. This is normally created with a call to the CreateGraphics() method of the Control or Form.

    Boolean isColumnSpecified

    Specifies whether the number of columns in each row, or the number of rows in each column will be specified. A value of true indicates the number of columns in each row are specified in .

    Int32[] countList

    An integer array specifying either the number of columns in each row or the number of rows in each column, depending on the value of .

    Remarks

    This method specifies the number of rows in each column, or the number of columns in each row, allowing for irregular layouts. Overloads are available that provide other layout options.

    See Also
    SetLayout(Graphics, PaneLayout)
    SetLayout(Graphics, Int32, Int32)
    SetLayout(Graphics, Boolean, Int32[], Single[])
    | Improve this Doc View Source

    SetLayout(Graphics, Boolean, Int32[], Single[])

    Automatically set all of the GraphPane Rect's in the list to the specified configuration.

    Declaration
    public void SetLayout(Graphics g, bool isColumnSpecified, int[] countList, float[] proportion)
    Parameters
    Type Name Description
    Graphics g

    A graphic device object to be drawn into. This is normally created with a call to the CreateGraphics() method of the Control or Form.

    Boolean isColumnSpecified

    Specifies whether the number of columns in each row, or the number of rows in each column will be specified. A value of true indicates the number of columns in each row are specified in .

    Int32[] countList

    An integer array specifying either the number of columns in each row or the number of rows in each column, depending on the value of .

    Single[] proportion

    An array of float values specifying proportional sizes for each row or column. Note that these proportions apply to the non-specified dimension -- that is, if is true, then these proportions apply to the row heights, and if is false, then these proportions apply to the column widths. The values in this array are arbitrary floats -- the dimension of any given row or column is that particular proportional value divided by the sum of all the values. For example, let be true, and is an array with values of { 1.0, 2.0, 3.0 }. The sum of those values is 6.0. Therefore, the first row is 1/6th of the available height, the second row is 2/6th's of the available height, and the third row is 3/6th's of the available height.

    Remarks

    This method specifies the number of panes in each row or column, allowing for irregular layouts.

    See Also
    SetLayout(Graphics, PaneLayout)
    SetLayout(Graphics, Int32, Int32)
    SetLayout(Graphics, Boolean, Int32[])
    | Improve this Doc View Source

    SetLayout(Graphics, Int32, Int32)

    Automatically set all of the GraphPane Rect's in the list to a reasonable configuration.

    Declaration
    public void SetLayout(Graphics g, int rows, int columns)
    Parameters
    Type Name Description
    Graphics g

    A graphic device object to be drawn into. This is normally created with a call to the CreateGraphics() method of the Control or Form.

    Int32 rows

    The number of rows of GraphPane objects to include in the layout

    Int32 columns

    The number of columns of GraphPane objects to include in the layout

    Remarks

    This method explicitly specifies the number of rows and columns to use in the layout, and all GraphPane objects will have the same size. Overloads are available that provide other layout options

    See Also
    SetLayout(Graphics, PaneLayout)
    SetLayout(Graphics, Boolean, Int32[])
    SetLayout(Graphics, Boolean, Int32[], Single[])
    | Improve this Doc View Source

    SetLayout(Graphics, PaneLayout)

    Automatically set all of the GraphPane Rect's in the list to a pre-defined layout configuration from a PaneLayout enumeration.

    Declaration
    public void SetLayout(Graphics g, PaneLayout paneLayout)
    Parameters
    Type Name Description
    Graphics g

    A graphic device object to be drawn into. This is normally created with a call to the CreateGraphics() method of the Control or Form.

    PaneLayout paneLayout

    A PaneLayout enumeration that describes how the panes should be laid out within the Rect.

    Remarks

    This method uses a PaneLayout enumeration to describe the type of layout to be used. Overloads are available that provide other layout options

    See Also
    SetLayout(Graphics, Int32, Int32)
    SetLayout(Graphics, Boolean, Int32[])
    SetLayout(Graphics, Boolean, Int32[], Single[])

    Explicit Interface Implementations

    | Improve this Doc View Source

    ICloneable.Clone()

    Implement the ICloneable interface in a typesafe manner by just calling the typed version of Clone() to make a deep copy.

    Declaration
    object ICloneable.Clone()
    Returns
    Type Description
    Object

    A deep copy of this object

    Implements

    System.ICloneable
    System.Runtime.Serialization.ISerializable
    System.Runtime.Serialization.IDeserializationCallback
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX