Search Results for

    Show / Hide Table of Contents

    Class ZedGraphControl

    The ZedGraphControl class provides a UserControl interface to the ZedGraph class library. This allows ZedGraph to be installed as a control in the Visual Studio toolbox. You can use the control by simply dragging it onto a form in the Visual Studio form editor. All graph attributes are accessible via the GraphPane property.

    Inheritance
    Object
    MarshalByRefObject
    Component
    Control
    ScrollableControl
    ContainerControl
    UserControl
    ZedGraphControl
    Implements
    ISynchronizeInvoke
    IBindableComponent
    IComponent
    IDisposable
    IDropTarget
    IWin32Window
    IContainerControl
    Inherited Members
    UserControl.OnCreateControl()
    UserControl.OnLoad(EventArgs)
    UserControl.OnMouseDown(MouseEventArgs)
    UserControl.OnResize(EventArgs)
    UserControl.ValidateChildren()
    UserControl.ValidateChildren(ValidationConstraints)
    UserControl.WndProc(Message)
    UserControl.AutoSize
    UserControl.AutoSizeMode
    UserControl.AutoValidate
    UserControl.BorderStyle
    UserControl.CreateParams
    UserControl.DefaultSize
    UserControl.AutoSizeChanged
    UserControl.AutoValidateChanged
    UserControl.Load
    ContainerControl.AdjustFormScrollbars(Boolean)
    ContainerControl.OnAutoValidateChanged(EventArgs)
    ContainerControl.OnFontChanged(EventArgs)
    ContainerControl.OnLayout(LayoutEventArgs)
    ContainerControl.OnParentChanged(EventArgs)
    ContainerControl.PerformAutoScale()
    ContainerControl.ProcessCmdKey(Message, Keys)
    ContainerControl.ProcessDialogChar(Char)
    ContainerControl.ProcessDialogKey(Keys)
    ContainerControl.ProcessMnemonic(Char)
    ContainerControl.ProcessTabKey(Boolean)
    ContainerControl.Select(Boolean, Boolean)
    ContainerControl.IContainerControl.ActivateControl(Control)
    ContainerControl.UpdateDefaultButton()
    ContainerControl.Validate()
    ContainerControl.Validate(Boolean)
    ContainerControl.ActiveControl
    ContainerControl.AutoScaleDimensions
    ContainerControl.AutoScaleFactor
    ContainerControl.AutoScaleMode
    ContainerControl.BindingContext
    ContainerControl.CanEnableIme
    ContainerControl.CurrentAutoScaleDimensions
    ContainerControl.ParentForm
    ScrollableControl.ScrollStateAutoScrolling
    ScrollableControl.ScrollStateFullDrag
    ScrollableControl.ScrollStateHScrollVisible
    ScrollableControl.ScrollStateUserHasScrolled
    ScrollableControl.ScrollStateVScrollVisible
    ScrollableControl.GetScrollState(Int32)
    ScrollableControl.OnMouseWheel(MouseEventArgs)
    ScrollableControl.OnPaddingChanged(EventArgs)
    ScrollableControl.OnPaintBackground(PaintEventArgs)
    ScrollableControl.OnRightToLeftChanged(EventArgs)
    ScrollableControl.OnScroll(ScrollEventArgs)
    ScrollableControl.OnVisibleChanged(EventArgs)
    ScrollableControl.ScaleControl(SizeF, BoundsSpecified)
    ScrollableControl.ScrollControlIntoView(Control)
    ScrollableControl.ScrollToControl(Control)
    ScrollableControl.SetAutoScrollMargin(Int32, Int32)
    ScrollableControl.SetDisplayRectLocation(Int32, Int32)
    ScrollableControl.SetScrollState(Int32, Boolean)
    ScrollableControl.AutoScroll
    ScrollableControl.AutoScrollMargin
    ScrollableControl.AutoScrollMinSize
    ScrollableControl.AutoScrollPosition
    ScrollableControl.DisplayRectangle
    ScrollableControl.HorizontalScroll
    ScrollableControl.HScroll
    ScrollableControl.VerticalScroll
    ScrollableControl.VScroll
    ScrollableControl.Scroll
    Control.AccessibilityNotifyClients(AccessibleEvents, Int32)
    Control.AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)
    Control.BeginInvoke(Delegate)
    Control.BeginInvoke(Delegate, Object[])
    Control.BringToFront()
    Control.Contains(Control)
    Control.CreateAccessibilityInstance()
    Control.CreateControl()
    Control.CreateControlsInstance()
    Control.CreateGraphics()
    Control.CreateHandle()
    Control.DefWndProc(Message)
    Control.DestroyHandle()
    Control.DoDragDrop(Object, DragDropEffects)
    Control.DrawToBitmap(Bitmap, Rectangle)
    Control.EndInvoke(IAsyncResult)
    Control.FindForm()
    Control.Focus()
    Control.FromChildHandle(IntPtr)
    Control.FromHandle(IntPtr)
    Control.GetAccessibilityObjectById(Int32)
    Control.GetAutoSizeMode()
    Control.GetChildAtPoint(Point)
    Control.GetChildAtPoint(Point, GetChildAtPointSkip)
    Control.GetContainerControl()
    Control.GetNextControl(Control, Boolean)
    Control.GetPreferredSize(Size)
    Control.GetScaledBounds(Rectangle, SizeF, BoundsSpecified)
    Control.GetStyle(ControlStyles)
    Control.GetTopLevel()
    Control.Hide()
    Control.InitLayout()
    Control.Invalidate()
    Control.Invalidate(Boolean)
    Control.Invalidate(Rectangle)
    Control.Invalidate(Rectangle, Boolean)
    Control.Invalidate(Region)
    Control.Invalidate(Region, Boolean)
    Control.Invoke(Delegate)
    Control.Invoke(Delegate, Object[])
    Control.InvokeGotFocus(Control, EventArgs)
    Control.InvokeLostFocus(Control, EventArgs)
    Control.InvokeOnClick(Control, EventArgs)
    Control.InvokePaint(Control, PaintEventArgs)
    Control.InvokePaintBackground(Control, PaintEventArgs)
    Control.IsInputChar(Char)
    Control.IsInputKey(Keys)
    Control.IsKeyLocked(Keys)
    Control.IsMnemonic(Char, String)
    Control.NotifyInvalidate(Rectangle)
    Control.OnAutoSizeChanged(EventArgs)
    Control.OnBackColorChanged(EventArgs)
    Control.OnBackgroundImageChanged(EventArgs)
    Control.OnBackgroundImageLayoutChanged(EventArgs)
    Control.OnBindingContextChanged(EventArgs)
    Control.OnCausesValidationChanged(EventArgs)
    Control.OnChangeUICues(UICuesEventArgs)
    Control.OnClick(EventArgs)
    Control.OnClientSizeChanged(EventArgs)
    Control.OnContextMenuChanged(EventArgs)
    Control.OnContextMenuStripChanged(EventArgs)
    Control.OnControlAdded(ControlEventArgs)
    Control.OnControlRemoved(ControlEventArgs)
    Control.OnCursorChanged(EventArgs)
    Control.OnDockChanged(EventArgs)
    Control.OnDoubleClick(EventArgs)
    Control.OnDragDrop(DragEventArgs)
    Control.OnDragEnter(DragEventArgs)
    Control.OnDragLeave(EventArgs)
    Control.OnDragOver(DragEventArgs)
    Control.OnEnabledChanged(EventArgs)
    Control.OnEnter(EventArgs)
    Control.OnForeColorChanged(EventArgs)
    Control.OnGiveFeedback(GiveFeedbackEventArgs)
    Control.OnGotFocus(EventArgs)
    Control.OnHandleCreated(EventArgs)
    Control.OnHandleDestroyed(EventArgs)
    Control.OnHelpRequested(HelpEventArgs)
    Control.OnImeModeChanged(EventArgs)
    Control.OnInvalidated(InvalidateEventArgs)
    Control.OnKeyDown(KeyEventArgs)
    Control.OnKeyPress(KeyPressEventArgs)
    Control.OnKeyUp(KeyEventArgs)
    Control.OnLeave(EventArgs)
    Control.OnLocationChanged(EventArgs)
    Control.OnLostFocus(EventArgs)
    Control.OnMarginChanged(EventArgs)
    Control.OnMouseCaptureChanged(EventArgs)
    Control.OnMouseClick(MouseEventArgs)
    Control.OnMouseDoubleClick(MouseEventArgs)
    Control.OnMouseEnter(EventArgs)
    Control.OnMouseHover(EventArgs)
    Control.OnMouseLeave(EventArgs)
    Control.OnMouseMove(MouseEventArgs)
    Control.OnMouseUp(MouseEventArgs)
    Control.OnMove(EventArgs)
    Control.OnNotifyMessage(Message)
    Control.OnParentBackColorChanged(EventArgs)
    Control.OnParentBackgroundImageChanged(EventArgs)
    Control.OnParentBindingContextChanged(EventArgs)
    Control.OnParentCursorChanged(EventArgs)
    Control.OnParentEnabledChanged(EventArgs)
    Control.OnParentFontChanged(EventArgs)
    Control.OnParentForeColorChanged(EventArgs)
    Control.OnParentRightToLeftChanged(EventArgs)
    Control.OnParentVisibleChanged(EventArgs)
    Control.OnPreviewKeyDown(PreviewKeyDownEventArgs)
    Control.OnPrint(PaintEventArgs)
    Control.OnQueryContinueDrag(QueryContinueDragEventArgs)
    Control.OnRegionChanged(EventArgs)
    Control.OnSizeChanged(EventArgs)
    Control.OnStyleChanged(EventArgs)
    Control.OnSystemColorsChanged(EventArgs)
    Control.OnTabIndexChanged(EventArgs)
    Control.OnTabStopChanged(EventArgs)
    Control.OnTextChanged(EventArgs)
    Control.OnValidated(EventArgs)
    Control.OnValidating(CancelEventArgs)
    Control.PerformLayout()
    Control.PerformLayout(Control, String)
    Control.PointToClient(Point)
    Control.PointToScreen(Point)
    Control.PreProcessControlMessage(Message)
    Control.PreProcessMessage(Message)
    Control.ProcessKeyEventArgs(Message)
    Control.ProcessKeyMessage(Message)
    Control.ProcessKeyPreview(Message)
    Control.RaiseDragEvent(Object, DragEventArgs)
    Control.RaiseKeyEvent(Object, KeyEventArgs)
    Control.RaiseMouseEvent(Object, MouseEventArgs)
    Control.RaisePaintEvent(Object, PaintEventArgs)
    Control.RecreateHandle()
    Control.RectangleToClient(Rectangle)
    Control.RectangleToScreen(Rectangle)
    Control.ReflectMessage(IntPtr, Message)
    Control.Refresh()
    Control.ResetMouseEventArgs()
    Control.ResetText()
    Control.ResumeLayout()
    Control.ResumeLayout(Boolean)
    Control.RtlTranslateAlignment(ContentAlignment)
    Control.RtlTranslateAlignment(HorizontalAlignment)
    Control.RtlTranslateAlignment(LeftRightAlignment)
    Control.RtlTranslateContent(ContentAlignment)
    Control.RtlTranslateHorizontal(HorizontalAlignment)
    Control.RtlTranslateLeftRight(LeftRightAlignment)
    Control.Scale(SizeF)
    Control.Select()
    Control.SelectNextControl(Control, Boolean, Boolean, Boolean, Boolean)
    Control.SendToBack()
    Control.SetAutoSizeMode(AutoSizeMode)
    Control.SetBounds(Int32, Int32, Int32, Int32)
    Control.SetBounds(Int32, Int32, Int32, Int32, BoundsSpecified)
    Control.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
    Control.SetClientSizeCore(Int32, Int32)
    Control.SetStyle(ControlStyles, Boolean)
    Control.SetTopLevel(Boolean)
    Control.SetVisibleCore(Boolean)
    Control.Show()
    Control.SizeFromClientSize(Size)
    Control.SuspendLayout()
    Control.IDropTarget.OnDragDrop(DragEventArgs)
    Control.IDropTarget.OnDragEnter(DragEventArgs)
    Control.IDropTarget.OnDragLeave(EventArgs)
    Control.IDropTarget.OnDragOver(DragEventArgs)
    Control.Update()
    Control.UpdateBounds()
    Control.UpdateBounds(Int32, Int32, Int32, Int32)
    Control.UpdateBounds(Int32, Int32, Int32, Int32, Int32, Int32)
    Control.UpdateStyles()
    Control.UpdateZOrder()
    Control.AccessibilityObject
    Control.AccessibleDefaultActionDescription
    Control.AccessibleDescription
    Control.AccessibleName
    Control.AccessibleRole
    Control.AllowDrop
    Control.Anchor
    Control.AutoScrollOffset
    Control.BackColor
    Control.BackgroundImage
    Control.BackgroundImageLayout
    Control.Bottom
    Control.Bounds
    Control.CanFocus
    Control.CanRaiseEvents
    Control.CanSelect
    Control.Capture
    Control.CausesValidation
    Control.CheckForIllegalCrossThreadCalls
    Control.ClientRectangle
    Control.ClientSize
    Control.CompanyName
    Control.ContainsFocus
    Control.ContextMenu
    Control.ContextMenuStrip
    Control.Controls
    Control.Created
    Control.Cursor
    Control.DataBindings
    Control.DefaultBackColor
    Control.DefaultCursor
    Control.DefaultFont
    Control.DefaultForeColor
    Control.DefaultImeMode
    Control.DefaultMargin
    Control.DefaultMaximumSize
    Control.DefaultMinimumSize
    Control.DefaultPadding
    Control.Disposing
    Control.Dock
    Control.DoubleBuffered
    Control.Enabled
    Control.Focused
    Control.Font
    Control.FontHeight
    Control.ForeColor
    Control.Handle
    Control.HasChildren
    Control.Height
    Control.ImeMode
    Control.InvokeRequired
    Control.IsAccessible
    Control.IsDisposed
    Control.IsHandleCreated
    Control.IsMirrored
    Control.LayoutEngine
    Control.Left
    Control.Location
    Control.Margin
    Control.MaximumSize
    Control.MinimumSize
    Control.ModifierKeys
    Control.MouseButtons
    Control.MousePosition
    Control.Name
    Control.Padding
    Control.Parent
    Control.PreferredSize
    Control.ProductName
    Control.ProductVersion
    Control.RecreatingHandle
    Control.Region
    Control.RenderRightToLeft
    Control.ResizeRedraw
    Control.Right
    Control.RightToLeft
    Control.ScaleChildren
    Control.ShowFocusCues
    Control.ShowKeyboardCues
    Control.Site
    Control.Size
    Control.TabIndex
    Control.TabStop
    Control.Tag
    Control.Text
    Control.Top
    Control.TopLevelControl
    Control.UseWaitCursor
    Control.Visible
    Control.Width
    Control.BackColorChanged
    Control.BackgroundImageChanged
    Control.BackgroundImageLayoutChanged
    Control.BindingContextChanged
    Control.CausesValidationChanged
    Control.ChangeUICues
    Control.Click
    Control.ClientSizeChanged
    Control.ContextMenuChanged
    Control.ContextMenuStripChanged
    Control.ControlAdded
    Control.ControlRemoved
    Control.CursorChanged
    Control.DockChanged
    Control.DoubleClick
    Control.DragDrop
    Control.DragEnter
    Control.DragLeave
    Control.DragOver
    Control.EnabledChanged
    Control.Enter
    Control.FontChanged
    Control.ForeColorChanged
    Control.GiveFeedback
    Control.GotFocus
    Control.HandleCreated
    Control.HandleDestroyed
    Control.HelpRequested
    Control.ImeModeChanged
    Control.Invalidated
    Control.KeyDown
    Control.KeyPress
    Control.KeyUp
    Control.Layout
    Control.Leave
    Control.LocationChanged
    Control.LostFocus
    Control.MarginChanged
    Control.MouseCaptureChanged
    Control.MouseClick
    Control.MouseDoubleClick
    Control.MouseEnter
    Control.MouseHover
    Control.MouseLeave
    Control.MouseMove
    Control.MouseWheel
    Control.Move
    Control.PaddingChanged
    Control.Paint
    Control.ParentChanged
    Control.PreviewKeyDown
    Control.QueryAccessibilityHelp
    Control.QueryContinueDrag
    Control.RegionChanged
    Control.Resize
    Control.RightToLeftChanged
    Control.SizeChanged
    Control.StyleChanged
    Control.SystemColorsChanged
    Control.TabIndexChanged
    Control.TabStopChanged
    Control.TextChanged
    Control.Validated
    Control.Validating
    Control.VisibleChanged
    Component.Dispose()
    Component.GetService(Type)
    Component.ToString()
    Component.Container
    Component.DesignMode
    Component.Events
    Component.Disposed
    MarshalByRefObject.CreateObjRef(Type)
    MarshalByRefObject.GetLifetimeService()
    MarshalByRefObject.InitializeLifetimeService()
    MarshalByRefObject.MemberwiseClone(Boolean)
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: ZedGraph
    Assembly: ZedGraph.WinForms.dll
    Syntax
    public class ZedGraphControl : UserControl, ISynchronizeInvoke, IBindableComponent, IComponent, IDisposable, IDropTarget, IWin32Window, IContainerControl

    Constructors

    | Improve this Doc View Source

    ZedGraphControl()

    Default Constructor

    Declaration
    public ZedGraphControl()

    Properties

    | Improve this Doc View Source

    BeenDisposed

    This checks if the control has been disposed. This is synonymous with the graph pane having been nulled or disposed. Therefore this is the same as ZedGraphControl.GraphPane == null.

    Declaration
    [Bindable(false)]
    [Browsable(false)]
    public bool BeenDisposed { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    EditButtons

    Gets or sets a value that determines which Mouse button will be used to edit point data values

    Declaration
    [Bindable(true)]
    public MouseButtons EditButtons { get; set; }
    Property Value
    Type Description
    MouseButtons
    Remarks

    This setting only applies if IsEnableHEdit and/or IsEnableVEdit are true.

    See Also
    EditModifierKeys
    | Improve this Doc View Source

    EditModifierKeys

    Gets or sets a value that determines which modifier keys will be used to edit point data values

    Declaration
    [Bindable(true)]
    public Keys EditModifierKeys { get; set; }
    Property Value
    Type Description
    Keys
    Remarks

    This setting only applies if IsEnableHEdit and/or IsEnableVEdit are true.

    See Also
    EditButtons
    | Improve this Doc View Source

    GraphPane

    Gets or sets the GraphPane property for the control

    Declaration
    [Bindable(false)]
    [Browsable(false)]
    public GraphPane GraphPane { get; set; }
    Property Value
    Type Description
    GraphPane
    Remarks

    ZedGraphControl actually uses a MasterPane object to hold a list of GraphPane objects. This property really only accesses the first GraphPane in the list. If there is more than one GraphPane, use the MasterPane indexer property to access any of the GraphPane objects.

    | Improve this Doc View Source

    IsAntiAlias

    Gets or sets a value that determines if all drawing operations for this control 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
    [Bindable(true)]
    public bool IsAntiAlias { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsAutoScrollRange

    Gets or sets a value that controls whether or not the axis value range for the scroll bars will be set automatically.

    Declaration
    [Bindable(true)]
    public bool IsAutoScrollRange { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    If this value is set to true, then the range of the scroll bars will be set automatically to the actual range of the data as returned by GetRange(Boolean, Boolean, GraphPane) at the time that AxisChange() was last called. Note that a value of true can override any setting of ScrollMinX, ScrollMaxX, ScrollMinY, ScrollMaxY, ScrollMinY2, and ScrollMaxY2. Note also that you must call AxisChange() from the ZedGraphControl for this to work properly (e.g., don't call it directly from the GraphPane. Alternatively, you can call SetScrollRangeFromData() at anytime to set the scroll bar range.
    In most cases, you will probably want to disable IsBoundedRanges before activating this option.

    | Improve this Doc View Source

    IsEnableHEdit

    Gets or sets a value that determines whether or not editing of point data is allowed in the horizontal direction.

    Declaration
    [Bindable(true)]
    public bool IsEnableHEdit { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Editing is done by holding down the Alt key, and left-clicking on an individual point of a given CurveItem to drag it to a new location. The Mouse and Key combination for this mode are modifiable using EditButtons and EditModifierKeys.

    See Also
    EditButtons
    EditModifierKeys
    IsEnableVEdit
    | Improve this Doc View Source

    IsEnableHPan

    Gets or sets a value that determines whether or not panning is allowed for the control in the horizontal direction.

    Declaration
    [Bindable(true)]
    public bool IsEnableHPan { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Panning is done by clicking the middle mouse button (or holding down the shift key while clicking the left mouse button) inside the Rect and dragging the mouse around to shift the scale ranges as desired.

    See Also
    IsEnableVPan
    | Improve this Doc View Source

    IsEnableHZoom

    Gets or sets a value that determines whether or not zooming is allowed for the control in the horizontal direction.

    Declaration
    [Bindable(true)]
    public bool IsEnableHZoom { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Zooming is done by left-clicking inside the Rect to drag out a rectangle, indicating the new scale ranges that will be part of the graph.

    | Improve this Doc View Source

    IsEnableSelection

    Gets or sets a value that determines whether or not selection is allowed for the control.

    Declaration
    [Bindable(true)]
    public bool IsEnableSelection { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsEnableVEdit

    Gets or sets a value that determines whether or not editing of point data is allowed in the vertical direction.

    Declaration
    [Bindable(true)]
    public bool IsEnableVEdit { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Editing is done by holding down the Alt key, and left-clicking on an individual point of a given CurveItem to drag it to a new location. The Mouse and Key combination for this mode are modifiable using EditButtons and EditModifierKeys.

    | Improve this Doc View Source

    IsEnableVPan

    Gets or sets a value that determines whether or not panning is allowed for the control in the vertical direction.

    Declaration
    [Bindable(true)]
    public bool IsEnableVPan { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Panning is done by clicking the middle mouse button (or holding down the shift key while clicking the left mouse button) inside the Rect and dragging the mouse around to shift the scale ranges as desired.

    See Also
    IsEnableHPan
    | Improve this Doc View Source

    IsEnableVZoom

    Gets or sets a value that determines whether or not zooming is allowed for the control in the vertical direction.

    Declaration
    [Bindable(true)]
    public bool IsEnableVZoom { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Zooming is done by left-clicking inside the Rect to drag out a rectangle, indicating the new scale ranges that will be part of the graph.

    | Improve this Doc View Source

    IsEnableWheelZoom

    Gets or sets a value that determines whether or not zooming is allowed via the mouse wheel.

    Declaration
    [Bindable(true)]
    public bool IsEnableWheelZoom { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Wheel zooming is done by rotating the mouse wheel. Note that this property is used in combination with the IsEnableHZoom and IsEnableVZoom properties to control zoom options.

    | Improve this Doc View Source

    IsEnableZoom

    Gets or sets a value that determines whether or not zooming is allowed for the control.

    Declaration
    [Bindable(true)]
    public bool IsEnableZoom { set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Zooming is done by left-clicking inside the Rect to drag out a rectangle, indicating the new scale ranges that will be part of the graph.

    | Improve this Doc View Source

    IsPrintFillPage

    Gets or sets a value that determines whether or not the MasterPane Rect dimensions will be expanded to fill the available space when printing this ZedGraphControl.

    Declaration
    [Bindable(true)]
    public bool IsPrintFillPage { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    If IsPrintKeepAspectRatio is also true, then the MasterPane Rect dimensions will be expanded to fit as large a space as possible while still honoring the visible aspect ratio.

    | Improve this Doc View Source

    IsPrintKeepAspectRatio

    Gets or sets a value that determines whether or not the visible aspect ratio of the MasterPane Rect will be preserved when printing this ZedGraphControl.

    Declaration
    [Bindable(true)]
    public bool IsPrintKeepAspectRatio { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsPrintScaleAll

    Gets or sets a value that determines whether the settings of IsFontsScaled and IsPenWidthScaled will be overridden to true during printing operations.

    Declaration
    [Bindable(true)]
    public bool IsPrintScaleAll { get; set; }
    Property Value
    Type Description
    Boolean

    A value of true will cause both IsFontsScaled and IsPenWidthScaled to be temporarily set to true during printing operations.

    Remarks

    Printing involves pixel maps that are typically of a dramatically different dimension than on-screen pixel maps. Therefore, it becomes more important to scale the fonts and lines to give a printed image that looks like what is shown on-screen. The default setting for IsFontsScaled is true, but the default setting for IsPenWidthScaled is false.

    | Improve this Doc View Source

    IsScrolling

    Returns true if the user is currently scrolling via the scrollbar, or false if no scrolling is taking place.

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

    This method just tests ScrollBar.Capture to see if the mouse has been captured by the scroll bar. If so, scrolling is active.

    | Improve this Doc View Source

    IsScrollY2

    Gets or sets a value that determines if the vertical scroll bar will affect the Y2 axis.

    Declaration
    [Bindable(true)]
    public bool IsScrollY2 { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    The vertical scroll bar is automatically associated with the Y axis. With this value, you can choose to include or exclude the Y2 axis with the scrolling. Note that the Y2 axis scrolling is handled as a secondary. The vertical scroll bar position always reflects the status of the Y axis. This can cause the Y2 axis to "jump" when first scrolled if the ScrollMinY2 and ScrollMaxY2 values are not set to the same proportions as ScrollMinY and ScrollMaxY with respect to the actual Min and Max. Also note that this property is actually just an alias to the IsScrollable property of the first element of YScrollRangeList.

    See Also
    IsShowVScrollBar
    ScrollMinY2
    ScrollMaxY2
    YScrollRangeList
    Y2ScrollRangeList
    | Improve this Doc View Source

    IsShowContextMenu

    Gets or sets a value that determines whether or not the context menu will be available.

    Declaration
    [Bindable(true)]
    public bool IsShowContextMenu { get; set; }
    Property Value
    Type Description
    Boolean

    true to allow the context menu, false to disable it

    Remarks

    The context menu is a menu that appears when you right-click on the ZedGraphControl. It provides options for Zoom, Pan, AutoScale, Clipboard Copy, and toggle IsShowPointValues.

    | Improve this Doc View Source

    IsShowCopyMessage

    Gets or sets a value that determines whether or not a message box will be shown in response to a context menu "Copy" command.

    Declaration
    [Bindable(true)]
    public bool IsShowCopyMessage { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Note that, if this property is set to false, the user will receive no indicative feedback in response to a Copy action.

    | Improve this Doc View Source

    IsShowCursorValues

    Gets or sets a value that determines whether or not tooltips will be displayed showing the current scale values when the mouse is within the Rect.

    Declaration
    [Bindable(true)]
    public bool IsShowCursorValues { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    The displayed values are taken from the current mouse position, and formatted according to PointValueFormat and/or PointDateFormat. If this value is set to true, it overrides the IsShowPointValues setting.

    | Improve this Doc View Source

    IsShowHScrollBar

    Gets or sets a value that determines if the horizontal scroll bar will be visible.

    Declaration
    [Bindable(true)]
    public bool IsShowHScrollBar { get; set; }
    Property Value
    Type Description
    Boolean

    A boolean value. true to display a horizontal scrollbar, false otherwise.

    Remarks

    This scroll bar allows the display to be scrolled in the horizontal direction. Another option is display panning, in which the user can move the display around by clicking directly on it and dragging (see IsEnableHPan and IsEnableVPan). You can control the available range of scrolling with the ScrollMinX and ScrollMaxX properties. Note that the scroll range can be set automatically by IsAutoScrollRange.
    In most cases, you will probably want to disable IsBoundedRanges before activating this option.

    | Improve this Doc View Source

    IsShowPointValues

    Gets or sets a value that determines whether or not tooltips will be displayed when the mouse hovers over data values.

    Declaration
    [Bindable(true)]
    public bool IsShowPointValues { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    The displayed values are taken from Tag if it is a String type, or ToString() otherwise (using the PointValueFormat as a format string). Additionally, the user can custom format the values using the PointValueEvent event. Note that IsShowPointValues may be overridden by IsShowCursorValues.

    | Improve this Doc View Source

    IsShowVScrollBar

    Gets or sets a value that determines if the vertical scroll bar will be visible.

    Declaration
    [Bindable(true)]
    public bool IsShowVScrollBar { get; set; }
    Property Value
    Type Description
    Boolean

    A boolean value. true to display a vertical scrollbar, false otherwise.

    Remarks

    This scroll bar allows the display to be scrolled in the vertical direction. Another option is display panning, in which the user can move the display around by clicking directly on it and dragging (see IsEnableHPan and IsEnableVPan). You can control the available range of scrolling with the ScrollMinY and ScrollMaxY properties. Note that the vertical scroll bar only affects the YAxis; it has no impact on the Y2Axis. The panning options affect both the YAxis and Y2Axis. Note also that the scroll range can be set automatically by IsAutoScrollRange.
    In most cases, you will probably want to disable IsBoundedRanges before activating this option.

    | Improve this Doc View Source

    IsSynchronizeXAxes

    Gets or sets a value that determines if the XAxis Scale ranges for all GraphPane objects in the MasterPane will be forced to match.

    Declaration
    [Bindable(true)]
    public bool IsSynchronizeXAxes { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    If set to true (default is false), then all of the GraphPane objects in the MasterPane associated with this ZedGraphControl will be forced to have matching scale ranges for the x axis. That is, zoom, pan, and scroll operations will result in zoom/pan/scroll for all graphpanes simultaneously.

    | Improve this Doc View Source

    IsSynchronizeYAxes

    Gets or sets a value that determines if the YAxis Scale ranges for all GraphPane objects in the MasterPane will be forced to match.

    Declaration
    [Bindable(true)]
    public bool IsSynchronizeYAxes { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    If set to true (default is false), then all of the GraphPane objects in the MasterPane associated with this ZedGraphControl will be forced to have matching scale ranges for the y axis. That is, zoom, pan, and scroll operations will result in zoom/pan/scroll for all graphpanes simultaneously.

    | Improve this Doc View Source

    IsZoomOnMouseCenter

    Gets or sets a boolean value that determines if zooming with the wheel mouse is centered on the mouse location, or centered on the existing graph.

    Declaration
    [Bindable(true)]
    public bool IsZoomOnMouseCenter { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    LinkButtons

    Gets or sets a value that determines which Mouse button will be used to click on linkable objects

    Declaration
    [Bindable(true)]
    public MouseButtons LinkButtons { get; set; }
    Property Value
    Type Description
    MouseButtons
    See Also
    LinkModifierKeys
    LinkEvent
    | Improve this Doc View Source

    LinkModifierKeys

    Gets or sets a value that determines which modifier keys will be used to click on linkable objects

    Declaration
    [Bindable(true)]
    public Keys LinkModifierKeys { get; set; }
    Property Value
    Type Description
    Keys
    See Also
    LinkButtons
    LinkEvent
    | Improve this Doc View Source

    MasterPane

    Gets or sets the MasterPane property for the control

    Declaration
    [Bindable(false)]
    [Browsable(false)]
    public MasterPane MasterPane { get; set; }
    Property Value
    Type Description
    MasterPane
    | Improve this Doc View Source

    PanButtons

    Gets or sets a value that determines which mouse button will be used as a primary option to trigger a pan event.

    Declaration
    [Bindable(true)]
    public MouseButtons PanButtons { get; set; }
    Property Value
    Type Description
    MouseButtons
    Remarks

    This value is combined with PanModifierKeys to determine the actual pan combination. A secondary pan button/key combination option is available via PanButtons2 and PanModifierKeys2. To not use this button/key combination, set the value of PanButtons to None.

    | Improve this Doc View Source

    PanButtons2

    Gets or sets a value that determines which mouse button will be used as the secondary option to trigger a pan event.

    Declaration
    [Bindable(true)]
    public MouseButtons PanButtons2 { get; set; }
    Property Value
    Type Description
    MouseButtons
    Remarks

    This value is combined with PanModifierKeys2 to determine the actual pan combination. The primary pan button/key combination option is available via PanButtons and PanModifierKeys. To not use this button/key combination, set the value of PanButtons2 to None.

    | Improve this Doc View Source

    PanModifierKeys

    Gets or sets a value that determines which modifier keys will be used as a primary option to trigger a pan event.

    Declaration
    [Bindable(true)]
    public Keys PanModifierKeys { get; set; }
    Property Value
    Type Description
    Keys
    Remarks

    This value is combined with PanButtons to determine the actual pan combination. A secondary pan button/key combination option is available via PanButtons2 and PanModifierKeys2. To not use this button/key combination, set the value of PanButtons to None.

    | Improve this Doc View Source

    PanModifierKeys2

    Gets or sets a value that determines which modifier keys will be used as a secondary option to trigger a pan event.

    Declaration
    [Bindable(true)]
    public Keys PanModifierKeys2 { get; set; }
    Property Value
    Type Description
    Keys
    Remarks

    This value is combined with PanButtons2 to determine the actual pan combination. A primary pan button/key combination option is available via PanButtons and PanModifierKeys. To not use this button/key combination, set the value of PanButtons2 to None.

    | Improve this Doc View Source

    PointDateFormat

    Gets or sets the format for displaying tooltip values. This format is passed to ToString(String).

    Declaration
    [Bindable(true)]
    public string PointDateFormat { get; set; }
    Property Value
    Type Description
    String
    Remarks

    Use the DateTimeFormatInfo type to determine the format strings.

    | Improve this Doc View Source

    PointValueFormat

    Gets or sets the format for displaying tooltip values. This format is passed to ToString(String).

    Declaration
    [Bindable(true)]
    public string PointValueFormat { get; set; }
    Property Value
    Type Description
    String
    Remarks

    Use the NumberFormatInfo type to determine the format strings.

    | Improve this Doc View Source

    PrintDocument

    Gets or sets the PrintDocument instance that is used for all of the context menu printing functions.

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

    SaveFileDialog

    Gets or sets the SaveFileDialog instance that will be used by the "Save As..." context menu item.

    Declaration
    [Bindable(true)]
    public SaveFileDialog SaveFileDialog { get; set; }
    Property Value
    Type Description
    SaveFileDialog
    Remarks

    This provides the opportunity to modify the dialog, such as setting the InitialDirectory property.

    | Improve this Doc View Source

    ScrollGrace

    Set a "grace" value that leaves a buffer area around the data when IsAutoScrollRange is true.

    Declaration
    public double ScrollGrace { get; set; }
    Property Value
    Type Description
    Double
    Remarks

    This value represents a fraction of the total range around each axis. For example, if the axis ranges from 0 to 100, then a 0.05 value for ScrollGrace would set the scroll range to -5 to 105.

    | Improve this Doc View Source

    ScrollMaxX

    The maximum value for the X axis scroll range.

    Declaration
    [Bindable(true)]
    public double ScrollMaxX { get; set; }
    Property Value
    Type Description
    Double

    A double value indicating the maximum axis value

    Remarks

    Effectively, the maximum endpoint of the scroll range will cause the Max value to be set to ScrollMaxX. Note that this value applies only to the scroll bar settings. Axis panning (see IsEnableHPan) is not affected by this value. Note that this value can be overridden by IsAutoScrollRange and SetScrollRangeFromData().

    | Improve this Doc View Source

    ScrollMaxY

    The maximum value for the Y axis scroll range.

    Declaration
    [Bindable(true)]
    public double ScrollMaxY { get; set; }
    Property Value
    Type Description
    Double

    A double value indicating the maximum axis value

    Remarks

    Effectively, the maximum endpoint of the scroll range will cause the Max value to be set to ScrollMaxY. Note that this value applies only to the scroll bar settings. Axis panning (see IsEnableVPan) is not affected by this value. Note that this value can be overridden by IsAutoScrollRange and SetScrollRangeFromData(). Also note that this property is actually just an alias to the Max property of the first element of YScrollRangeList.

    See Also
    YScrollRangeList
    | Improve this Doc View Source

    ScrollMaxY2

    The maximum value for the Y2 axis scroll range.

    Declaration
    [Bindable(true)]
    public double ScrollMaxY2 { get; set; }
    Property Value
    Type Description
    Double

    A double value indicating the maximum axis value

    Remarks

    Effectively, the maximum endpoint of the scroll range will cause the Max value to be set to ScrollMaxY2. Note that this value applies only to the scroll bar settings. Axis panning (see IsEnableVPan) is not affected by this value. Note that this value can be overridden by IsAutoScrollRange and SetScrollRangeFromData(). Also note that this property is actually just an alias to the Max property of the first element of Y2ScrollRangeList.

    See Also
    Y2ScrollRangeList
    | Improve this Doc View Source

    ScrollMinX

    The minimum value for the X axis scroll range.

    Declaration
    [Bindable(true)]
    public double ScrollMinX { get; set; }
    Property Value
    Type Description
    Double

    A double value indicating the minimum axis value

    Remarks

    Effectively, the minimum endpoint of the scroll range will cause the Min value to be set to ScrollMinX. Note that this value applies only to the scroll bar settings. Axis panning (see IsEnableHPan) is not affected by this value. Note that this value can be overridden by IsAutoScrollRange and SetScrollRangeFromData().

    | Improve this Doc View Source

    ScrollMinY

    The minimum value for the Y axis scroll range.

    Declaration
    [Bindable(true)]
    public double ScrollMinY { get; set; }
    Property Value
    Type Description
    Double

    A double value indicating the minimum axis value

    Remarks

    Effectively, the minimum endpoint of the scroll range will cause the Min value to be set to ScrollMinY. Note that this value applies only to the scroll bar settings. Axis panning (see IsEnableVPan) is not affected by this value. Note that this value can be overridden by IsAutoScrollRange and SetScrollRangeFromData(). Also note that this property is actually just an alias to the Min property of the first element of YScrollRangeList.

    See Also
    YScrollRangeList
    | Improve this Doc View Source

    ScrollMinY2

    The minimum value for the Y2 axis scroll range.

    Declaration
    [Bindable(true)]
    public double ScrollMinY2 { get; set; }
    Property Value
    Type Description
    Double

    A double value indicating the minimum axis value

    Remarks

    Effectively, the minimum endpoint of the scroll range will cause the Min value to be set to ScrollMinY2. Note that this value applies only to the scroll bar settings. Axis panning (see IsEnableVPan) is not affected by this value. Note that this value can be overridden by IsAutoScrollRange and SetScrollRangeFromData(). Also note that this property is actually just an alias to the Min property of the first element of Y2ScrollRangeList.

    See Also
    Y2ScrollRangeList
    | Improve this Doc View Source

    SelectAppendModifierKeys

    Gets or sets a value that determines which Modifier keys will be used to append a CurveItem to the selection list.

    Declaration
    [Bindable(true)]
    public Keys SelectAppendModifierKeys { get; }
    Property Value
    Type Description
    Keys
    | Improve this Doc View Source

    SelectButtons

    Gets or sets a value that determines which Mouse button will be used to select CurveItem's.

    Declaration
    [Bindable(true)]
    public MouseButtons SelectButtons { get; set; }
    Property Value
    Type Description
    MouseButtons
    Remarks

    This setting only applies if IsEnableSelection is true.

    See Also
    SelectModifierKeys
    | Improve this Doc View Source

    Selection

    Readonly property that gets the list of selected CurveItems

    Declaration
    public Selection Selection { get; }
    Property Value
    Type Description
    Selection
    | Improve this Doc View Source

    SelectModifierKeys

    Gets or sets a value that determines which Modifier keys will be used to select CurveItem's.

    Declaration
    [Bindable(true)]
    public Keys SelectModifierKeys { get; set; }
    Property Value
    Type Description
    Keys
    Remarks

    This setting only applies if IsEnableSelection is true.

    See Also
    SelectButtons
    | Improve this Doc View Source

    UseExtendedPrintDialog

    Gets or sets a value indicating whether the dialog should be shown in the Windows XP style for systems running Windows XP Home Edition, Windows XP Professional, Windows Server 2003?or later. The default is true.

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

    true to indicate the dialog should be shown with the Windows XP style, otherwise false.

    | Improve this Doc View Source

    Y2ScrollRangeList

    Access the ScrollRangeList for the Y2 axes.

    Declaration
    [Bindable(true)]
    public ScrollRangeList Y2ScrollRangeList { get; }
    Property Value
    Type Description
    ScrollRangeList
    Remarks

    This list maintains the user scale ranges for the scroll bars for each axis in the Y2AxisList. Each ordinal location in Y2ScrollRangeList corresponds to an equivalent ordinal location in Y2AxisList.

    See Also
    ScrollMinY2
    ScrollMaxY2
    | Improve this Doc View Source

    YScrollRangeList

    Access the ScrollRangeList for the Y axes.

    Declaration
    [Bindable(true)]
    public ScrollRangeList YScrollRangeList { get; }
    Property Value
    Type Description
    ScrollRangeList
    Remarks

    This list maintains the user scale ranges for the scroll bars for each axis in the YAxisList. Each ordinal location in YScrollRangeList corresponds to an equivalent ordinal location in YAxisList.

    See Also
    ScrollMinY
    ScrollMaxY
    | Improve this Doc View Source

    ZoomButtons

    Gets or sets a value that determines which mouse button will be used as a primary option to trigger a zoom event.

    Declaration
    [Bindable(true)]
    public MouseButtons ZoomButtons { get; set; }
    Property Value
    Type Description
    MouseButtons
    Remarks

    This value is combined with ZoomModifierKeys to determine the actual zoom combination. A secondary zoom button/key combination option is available via ZoomButtons2 and ZoomModifierKeys2. To not use this button/key combination, set the value of ZoomButtons to None.

    | Improve this Doc View Source

    ZoomButtons2

    Gets or sets a value that determines which mouse button will be used as the secondary option to trigger a zoom event.

    Declaration
    [Bindable(true)]
    public MouseButtons ZoomButtons2 { get; set; }
    Property Value
    Type Description
    MouseButtons
    Remarks

    This value is combined with ZoomModifierKeys2 to determine the actual zoom combination. The primary zoom button/key combination option is available via ZoomButtons and ZoomModifierKeys. To not use this button/key combination, set the value of ZoomButtons2 to None.

    | Improve this Doc View Source

    ZoomModifierKeys

    Gets or sets a value that determines which modifier keys will be used as a primary option to trigger a zoom event.

    Declaration
    [Bindable(true)]
    public Keys ZoomModifierKeys { get; set; }
    Property Value
    Type Description
    Keys
    Remarks

    This value is combined with ZoomButtons to determine the actual zoom combination. A secondary zoom button/key combination option is available via ZoomButtons2 and ZoomModifierKeys2. To not use this button/key combination, set the value of ZoomButtons to None.

    | Improve this Doc View Source

    ZoomModifierKeys2

    Gets or sets a value that determines which modifier keys will be used as a secondary option to trigger a zoom event.

    Declaration
    [Bindable(true)]
    public Keys ZoomModifierKeys2 { get; set; }
    Property Value
    Type Description
    Keys
    Remarks

    This value is combined with ZoomButtons2 to determine the actual zoom combination. A primary zoom button/key combination option is available via ZoomButtons and ZoomModifierKeys. To not use this button/key combination, set the value of ZoomButtons2 to None.

    | Improve this Doc View Source

    ZoomStepFraction

    Gets or sets the step size fraction for zooming with the mouse wheel. A value of 0.1 will result in a 10% zoom step for each mouse wheel movement.

    Declaration
    [Bindable(true)]
    public double ZoomStepFraction { get; set; }
    Property Value
    Type Description
    Double

    Methods

    | Improve this Doc View Source

    AxisChange()

    This performs an axis change command on the graphPane.

    Declaration
    public virtual void AxisChange()
    Remarks

    This is the same as ZedGraphControl.GraphPane.AxisChange( ZedGraphControl.CreateGraphics() ), however, this method also calls SetScrollRangeFromData() if IsAutoScrollRange is true.

    | Improve this Doc View Source

    Copy(Boolean)

    Handler for the "Copy" context menu item. Copies the current image to a bitmap on the clipboard.

    Declaration
    public void Copy(bool isShowMessage)
    Parameters
    Type Name Description
    Boolean isShowMessage

    boolean value that determines whether or not a prompt will be displayed. true to show a message of "Image Copied to ClipBoard".

    | Improve this Doc View Source

    CopyEmf(Boolean)

    Special handler that copies the current image to an Emf file on the clipboard.

    Declaration
    public void CopyEmf(bool isShowMessage)
    Parameters
    Type Name Description
    Boolean isShowMessage

    boolean value that determines whether or not a prompt will be displayed. true to show a message of "Image Copied to ClipBoard".

    Remarks

    This version is similar to the regular Copy(Boolean) method, except that it will place an Emf image (vector) on the ClipBoard instead of the regular bitmap.

    | Improve this Doc View Source

    Dispose(Boolean)

    Clean up any resources being used.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    true if the components should be disposed, false otherwise

    Overrides
    ContainerControl.Dispose(Boolean)
    | Improve this Doc View Source

    DoPageSetup()

    Display a PageSetupDialog to the user, allowing them to modify the print settings for this ZedGraphControl.

    Declaration
    public void DoPageSetup()
    | Improve this Doc View Source

    DoPrint()

    Display a PrintDialog to the user, allowing them to select a printer and print the MasterPane contained in this ZedGraphControl.

    Declaration
    public void DoPrint()
    | Improve this Doc View Source

    DoPrintPreview()

    Display a PrintPreviewDialog, allowing the user to preview and subsequently print the MasterPane contained in this ZedGraphControl.

    Declaration
    public void DoPrintPreview()
    | Improve this Doc View Source

    GetImage()

    Gets the graph pane's current image. Bitmap

    Declaration
    [Bindable(false)]
    [Browsable(false)]
    public Image GetImage()
    Returns
    Type Description
    Image
    Exceptions
    Type Condition
    ZedGraphException

    When the control has been disposed before this call.

    | Improve this Doc View Source

    MakeValueLabel(Axis, Double, Int32, Boolean)

    Make a string label that corresponds to a user scale value.

    Declaration
    protected string MakeValueLabel(Axis axis, double val, int iPt, bool isOverrideOrdinal)
    Parameters
    Type Name Description
    Axis axis

    The axis from which to obtain the scale value. This determines if it's a date value, linear, log, etc.

    Double val

    The value to be made into a label

    Int32 iPt

    The ordinal position of the value

    Boolean isOverrideOrdinal

    true to override the ordinal settings of the axis, and prefer the actual value instead.

    Returns
    Type Description
    String

    The string label.

    | Improve this Doc View Source

    MenuClick_Copy(Object, EventArgs)

    Handler for the "Copy" context menu item. Copies the current image to a bitmap on the clipboard.

    Declaration
    protected void MenuClick_Copy(object sender, EventArgs e)
    Parameters
    Type Name Description
    Object sender
    EventArgs e
    | Improve this Doc View Source

    MenuClick_PageSetup(Object, EventArgs)

    Handler for the "Page Setup..." context menu item. Displays a PageSetupDialog.

    Declaration
    protected void MenuClick_PageSetup(object sender, EventArgs e)
    Parameters
    Type Name Description
    Object sender
    EventArgs e
    | Improve this Doc View Source

    MenuClick_Print(Object, EventArgs)

    Handler for the "Print..." context menu item. Displays a PrintDialog.

    Declaration
    protected void MenuClick_Print(object sender, EventArgs e)
    Parameters
    Type Name Description
    Object sender
    EventArgs e
    | Improve this Doc View Source

    MenuClick_RestoreScale(Object, EventArgs)

    Handler for the "Set Scale to Default" context menu item. Sets the scale ranging to full auto mode for all axes.

    Declaration
    protected void MenuClick_RestoreScale(object sender, EventArgs e)
    Parameters
    Type Name Description
    Object sender
    EventArgs e
    Remarks

    This method differs from the ZoomOutAll(GraphPane) method in that it sets the scales to full auto mode. The ZoomOutAll(GraphPane) method sets the scales to their initial setting prior to any user actions (which may or may not be full auto mode).

    | Improve this Doc View Source

    MenuClick_SaveAs(Object, EventArgs)

    Handler for the "Save Image As" context menu item. Copies the current image to the selected file.

    Declaration
    protected void MenuClick_SaveAs(object sender, EventArgs e)
    Parameters
    Type Name Description
    Object sender
    EventArgs e
    | Improve this Doc View Source

    MenuClick_ShowValues(Object, EventArgs)

    Handler for the "Show Values" context menu item. Toggles the IsShowPointValues property, which activates the point value tooltips.

    Declaration
    protected void MenuClick_ShowValues(object sender, EventArgs e)
    Parameters
    Type Name Description
    Object sender
    EventArgs e
    | Improve this Doc View Source

    MenuClick_ZoomOut(Object, EventArgs)

    Handler for the "UnZoom/UnPan" context menu item. Restores the scale ranges to the values before the last zoom or pan operation.

    Declaration
    protected void MenuClick_ZoomOut(object sender, EventArgs e)
    Parameters
    Type Name Description
    Object sender
    EventArgs e
    | Improve this Doc View Source

    MenuClick_ZoomOutAll(Object, EventArgs)

    Handler for the "Undo All Zoom/Pan" context menu item. Restores the scale ranges to the values before all zoom and pan operations

    Declaration
    protected void MenuClick_ZoomOutAll(object sender, EventArgs e)
    Parameters
    Type Name Description
    Object sender
    EventArgs e
    Remarks

    This method differs from the RestoreScale(GraphPane) method in that it sets the scales to their initial setting prior to any user actions. The RestoreScale(GraphPane) method sets the scales to full auto mode (regardless of what the initial setting may have been).

    | Improve this Doc View Source

    OnPaint(PaintEventArgs)

    Called by the system to update the control on-screen

    Declaration
    protected override void OnPaint(PaintEventArgs e)
    Parameters
    Type Name Description
    PaintEventArgs e

    A PaintEventArgs object containing the Graphics specifications for this Paint event.

    Overrides
    Control.OnPaint(PaintEventArgs)
    | Improve this Doc View Source

    PanScale(Axis, Double, Double)

    Handle a panning operation for the specified Axis.

    Declaration
    protected void PanScale(Axis axis, double startVal, double endVal)
    Parameters
    Type Name Description
    Axis axis

    The Axis to be panned

    Double startVal

    The value where the pan started. The scale range will be shifted by the difference between and .

    Double endVal

    The value where the pan ended. The scale range will be shifted by the difference between and .

    | Improve this Doc View Source

    RestoreScale(GraphPane)

    Handler for the "Set Scale to Default" context menu item. Sets the scale ranging to full auto mode for all axes.

    Declaration
    public void RestoreScale(GraphPane primaryPane)
    Parameters
    Type Name Description
    GraphPane primaryPane

    The GraphPane object which is to have the scale restored

    Remarks

    This method differs from the ZoomOutAll(GraphPane) method in that it sets the scales to full auto mode. The ZoomOutAll(GraphPane) method sets the scales to their initial setting prior to any user actions (which may or may not be full auto mode).

    | Improve this Doc View Source

    SaveAs()

    Handler for the "Save Image As" context menu item. Copies the current image to the selected file in either the Emf (vector), or a variety of Bitmap formats.

    Declaration
    public void SaveAs()
    Remarks

    Note that SaveAsBitmap() and SaveAsEmf() methods are provided which allow for Bitmap-only or Emf-only handling of the "Save As" context menu item.

    | Improve this Doc View Source

    SaveAs(String)

    Copies the current image to the selected file in
    Emf (vector), or a variety of Bitmap formats.

    Declaration
    public string SaveAs(string DefaultFileName)
    Parameters
    Type Name Description
    String DefaultFileName

    Accepts a default file name for the file dialog (if "" or null, default is not used)

    Returns
    Type Description
    String

    The file name saved, or "" if cancelled.

    Remarks

    Note that SaveAsBitmap() and SaveAsEmf() methods are provided which allow for Bitmap-only or Emf-only handling of the "Save As" context menu item.

    | Improve this Doc View Source

    SaveAsBitmap()

    Handler for the "Save Image As" context menu item. Copies the current image to the selected Bitmap file.

    Declaration
    public void SaveAsBitmap()
    Remarks

    Note that this handler saves as a bitmap only. The default handler is SaveAs(), which allows for Bitmap or EMF formats

    | Improve this Doc View Source

    SaveAsEmf()

    Handler for the "Save Image As" context menu item. Copies the current image to the selected Emf format file.

    Declaration
    public void SaveAsEmf()
    Remarks

    Note that this handler saves as an Emf format only. The default handler is SaveAs(), which allows for Bitmap or EMF formats.

    | Improve this Doc View Source

    SetCursor()

    Set the cursor according to the current mouse location.

    Declaration
    protected void SetCursor()
    | Improve this Doc View Source

    SetCursor(Point)

    Set the cursor according to the current mouse location.

    Declaration
    protected void SetCursor(Point mousePt)
    Parameters
    Type Name Description
    Point mousePt
    | Improve this Doc View Source

    SetScrollRangeFromData()

    Sets the value of the scroll range properties (see ScrollMinX, ScrollMaxX, YScrollRangeList, and Y2ScrollRangeList based on the actual range of the data for each corresponding Axis.

    Declaration
    public void SetScrollRangeFromData()
    Remarks

    This method is called automatically by AxisChange() if IsAutoScrollRange is true. Note that this will not be called if you call AxisChange directly from the GraphPane. For example, zedGraphControl1.AxisChange() works properly, but zedGraphControl1.GraphPane.AxisChange() does not.

    | Improve this Doc View Source

    ZedGraphControl_KeyDown(Object, KeyEventArgs)

    Handle the Key Events so ZedGraph can Escape out of a panning or zooming operation.

    Declaration
    protected void ZedGraphControl_KeyDown(object sender, KeyEventArgs e)
    Parameters
    Type Name Description
    Object sender
    KeyEventArgs e
    | Improve this Doc View Source

    ZedGraphControl_KeyUp(Object, KeyEventArgs)

    Handle a KeyUp event

    Declaration
    protected void ZedGraphControl_KeyUp(object sender, KeyEventArgs e)
    Parameters
    Type Name Description
    Object sender

    The ZedGraphControl in which the KeyUp occurred.

    KeyEventArgs e

    A KeyEventArgs instance.

    | Improve this Doc View Source

    ZedGraphControl_MouseDown(Object, MouseEventArgs)

    Handle a MouseDown event in the ZedGraphControl

    Declaration
    protected void ZedGraphControl_MouseDown(object sender, MouseEventArgs e)
    Parameters
    Type Name Description
    Object sender

    A reference to the ZedGraphControl

    MouseEventArgs e

    A MouseEventArgs instance

    | Improve this Doc View Source

    ZedGraphControl_MouseMove(Object, MouseEventArgs)

    protected method for handling MouseMove events to display tooltips over individual datapoints.

    Declaration
    protected void ZedGraphControl_MouseMove(object sender, MouseEventArgs e)
    Parameters
    Type Name Description
    Object sender

    A reference to the control that has the MouseMove event.

    MouseEventArgs e

    A MouseEventArgs object.

    | Improve this Doc View Source

    ZedGraphControl_MouseUp(Object, MouseEventArgs)

    Handle a MouseUp event in the ZedGraphControl

    Declaration
    protected void ZedGraphControl_MouseUp(object sender, MouseEventArgs e)
    Parameters
    Type Name Description
    Object sender

    A reference to the ZedGraphControl

    MouseEventArgs e

    A MouseEventArgs instance

    | Improve this Doc View Source

    ZedGraphControl_MouseWheel(Object, MouseEventArgs)

    Handle a MouseWheel event in the ZedGraphControl

    Declaration
    protected void ZedGraphControl_MouseWheel(object sender, MouseEventArgs e)
    Parameters
    Type Name Description
    Object sender

    A reference to the ZedGraphControl

    MouseEventArgs e

    A MouseEventArgs instance

    | Improve this Doc View Source

    ZedGraphControl_ReSize(Object, EventArgs)

    Called when the control has been resized.

    Declaration
    protected void ZedGraphControl_ReSize(object sender, EventArgs e)
    Parameters
    Type Name Description
    Object sender

    A reference to the control that has been resized.

    EventArgs e

    An EventArgs object.

    | Improve this Doc View Source

    ZoomOut(GraphPane)

    Handler for the "UnZoom/UnPan" context menu item. Restores the scale ranges to the values before the last zoom, pan, or scroll operation.

    Declaration
    public void ZoomOut(GraphPane primaryPane)
    Parameters
    Type Name Description
    GraphPane primaryPane

    The primary GraphPane object which is to be zoomed out

    Remarks

    Triggers a ZoomEvent for any type of undo (including pan, scroll, zoom, and wheelzoom). This method will affect all the GraphPane objects in the MasterPane if IsSynchronizeXAxes or IsSynchronizeYAxes is true.

    | Improve this Doc View Source

    ZoomOutAll(GraphPane)

    Handler for the "Undo All Zoom/Pan" context menu item. Restores the scale ranges to the values before all zoom and pan operations

    Declaration
    public void ZoomOutAll(GraphPane primaryPane)
    Parameters
    Type Name Description
    GraphPane primaryPane

    The GraphPane object which is to be zoomed out

    Remarks

    This method differs from the RestoreScale(GraphPane) method in that it sets the scales to their initial setting prior to any user actions. The RestoreScale(GraphPane) method sets the scales to full auto mode (regardless of what the initial setting may have been).

    | Improve this Doc View Source

    ZoomPane(GraphPane, Double, PointF, Boolean)

    Zoom a specified pane in or out according to the specified zoom fraction.

    Declaration
    public void ZoomPane(GraphPane pane, double zoomFraction, PointF centerPt, bool isZoomOnCenter)
    Parameters
    Type Name Description
    GraphPane pane

    The GraphPane instance to be zoomed.

    Double zoomFraction

    The fraction by which to zoom, less than 1 to zoom in, greater than 1 to zoom out. For example, 0.9 will zoom in such that the scale is 90% of what it was originally.

    PointF centerPt

    The screen position about which the zoom will be centered. This value is only used if is true.

    Boolean isZoomOnCenter

    true to cause the zoom to be centered on the point , false to center on the Rect.

    Remarks

    The zoom will occur on the XAxis, YAxis, and Y2Axis only if the corresponding flag, IsEnableHZoom or IsEnableVZoom, is true. Note that if there are multiple Y or Y2 axes, all of them will be zoomed.

    | Improve this Doc View Source

    ZoomPane(GraphPane, Double, PointF, Boolean, Boolean)

    Zoom a specified pane in or out according to the specified zoom fraction.

    Declaration
    protected void ZoomPane(GraphPane pane, double zoomFraction, PointF centerPt, bool isZoomOnCenter, bool isRefresh)
    Parameters
    Type Name Description
    GraphPane pane

    The GraphPane instance to be zoomed.

    Double zoomFraction

    The fraction by which to zoom, less than 1 to zoom in, greater than 1 to zoom out. For example, 0.9 will zoom in such that the scale is 90% of what it was originally.

    PointF centerPt

    The screen position about which the zoom will be centered. This value is only used if is true.

    Boolean isZoomOnCenter

    true to cause the zoom to be centered on the point , false to center on the Rect.

    Boolean isRefresh

    true to force a refresh of the control, false to leave it unrefreshed

    Remarks

    The zoom will occur on the XAxis, YAxis, and Y2Axis only if the corresponding flag, IsEnableHZoom or IsEnableVZoom, is true. Note that if there are multiple Y or Y2 axes, all of them will be zoomed.

    | Improve this Doc View Source

    ZoomScale(Axis, Double, Double, Boolean)

    Zoom the specified axis by the specified amount, with the center of the zoom at the (optionally) specified point.

    Declaration
    protected void ZoomScale(Axis axis, double zoomFraction, double centerVal, bool isZoomOnCenter)
    Parameters
    Type Name Description
    Axis axis

    The Axis to be zoomed.

    Double zoomFraction

    The zoom fraction, less than 1.0 to zoom in, greater than 1.0 to zoom out. That is, a value of 0.9 will zoom in such that the scale length is 90% of what it previously was.

    Double centerVal

    The location for the center of the zoom. This is only used if is true.

    Boolean isZoomOnCenter

    true if the zoom is to be centered at the screen position, false for the zoom to be centered within the Rect.

    Remarks

    This method is used for MouseWheel zoom operations

    Events

    | Improve this Doc View Source

    ContextMenuBuilder

    Subscribe to this event to be able to modify the ZedGraph context menu.

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.ContextMenuBuilderEventHandler ContextMenuBuilder
    Event Type
    Type Description
    ZedGraphControl.ContextMenuBuilderEventHandler
    Remarks

    The context menu is built on the fly after a right mouse click. You can add menu items to this menu by simply modifying the parameter.

    | Improve this Doc View Source

    CursorValueEvent

    Subscribe to this event to provide custom formatting for the cursor value tooltips

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.CursorValueHandler CursorValueEvent
    Event Type
    Type Description
    ZedGraphControl.CursorValueHandler
    Examples

    To subscribe to this event, use the following in your FormLoad method:

    zedGraphControl1.CursorValueEvent +=
    new ZedGraphControl.CursorValueHandler( MyCursorValueHandler );

    Add this method to your Form1.cs:

       private string MyCursorValueHandler( object sender, GraphPane pane, Point mousePt )
       {
       #region
    	double x, y;
    	pane.ReverseTransform( mousePt, out x, out y );
    	return "( " + x.ToString( "f2" ) + ", " + y.ToString( "f2" ) + " )";
       #endregion
       }
    | Improve this Doc View Source

    DoubleClickEvent

    Subscribe to this event to provide notification of Double Clicks on graph objects

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.ZedMouseEventHandler DoubleClickEvent
    Event Type
    Type Description
    ZedGraphControl.ZedMouseEventHandler
    Remarks

    This event provides for a notification when the mouse is double-clicked on an object within any GraphPane of the MasterPane associated with this ZedGraphControl. This event will use the FindNearestPaneObject(PointF, Graphics, out GraphPane, out Object, out Int32) method to determine which object was clicked. The boolean value that you return from this handler determines whether or not the ZedGraphControl will do any further handling of the DoubleClick event (see ZedGraphControl.ZedMouseEventHandler). Return true if you have handled the DoubleClick event entirely, and you do not want the ZedGraphControl to do any further action. Return false if ZedGraph should go ahead and process the DoubleClick event.

    | Improve this Doc View Source

    LinkEvent

    Subscribe to this event to be able to respond to mouse clicks within linked objects.

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.LinkEventHandler LinkEvent
    Event Type
    Type Description
    ZedGraphControl.LinkEventHandler
    Remarks

    Linked objects are typically either GraphObj type objects or CurveItem type objects. These object types can include hyperlink information allowing for "drill-down" type operation.

    See Also
    ZedGraphControl.LinkEventHandler
    Link
    Link
    Link
    | Improve this Doc View Source

    MouseDown

    Hide the standard control MouseDown event so that the ZedGraphControl.MouseDownEvent can be used. This is so that the user must return true/false in order to indicate whether or not we should respond to the event.

    Declaration
    [Bindable(false)]
    [Browsable(false)]
    public event MouseEventHandler MouseDown
    Event Type
    Type Description
    MouseEventHandler
    | Improve this Doc View Source

    MouseDownEvent

    Subscribe to this event to provide notification of MouseDown clicks on graph objects

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.ZedMouseEventHandler MouseDownEvent
    Event Type
    Type Description
    ZedGraphControl.ZedMouseEventHandler
    Remarks

    This event provides for a notification when the mouse is clicked on an object within any GraphPane of the MasterPane associated with this ZedGraphControl. This event will use the FindNearestPaneObject(PointF, Graphics, out GraphPane, out Object, out Int32) method to determine which object was clicked. The boolean value that you return from this handler determines whether or not the ZedGraphControl will do any further handling of the MouseDown event (see ZedGraphControl.ZedMouseEventHandler). Return true if you have handled the MouseDown event entirely, and you do not want the ZedGraphControl to do any further action (e.g., starting a zoom operation). Return false if ZedGraph should go ahead and process the MouseDown event.

    | Improve this Doc View Source

    MouseMoveEvent

    Subscribe to this event to provide notification of MouseMove events over graph objects

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.ZedMouseEventHandler MouseMoveEvent
    Event Type
    Type Description
    ZedGraphControl.ZedMouseEventHandler
    Remarks

    This event provides for a notification when the mouse is moving over on the control. The boolean value that you return from this handler determines whether or not the ZedGraphControl will do any further handling of the MouseMove event (see ZedGraphControl.ZedMouseEventHandler). Return true if you have handled the MouseMove event entirely, and you do not want the ZedGraphControl to do any further action. Return false if ZedGraph should go ahead and process the MouseMove event.

    | Improve this Doc View Source

    MouseUp

    Hide the standard control MouseUp event so that the ZedGraphControl.MouseUpEvent can be used. This is so that the user must return true/false in order to indicate whether or not we should respond to the event.

    Declaration
    [Bindable(false)]
    [Browsable(false)]
    public event MouseEventHandler MouseUp
    Event Type
    Type Description
    MouseEventHandler
    | Improve this Doc View Source

    MouseUpEvent

    Subscribe to this event to provide notification of MouseUp clicks on graph objects

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.ZedMouseEventHandler MouseUpEvent
    Event Type
    Type Description
    ZedGraphControl.ZedMouseEventHandler
    Remarks

    This event provides for a notification when the mouse is clicked on an object within any GraphPane of the MasterPane associated with this ZedGraphControl. This event will use the FindNearestPaneObject(PointF, Graphics, out GraphPane, out Object, out Int32) method to determine which object was clicked. The boolean value that you return from this handler determines whether or not the ZedGraphControl will do any further handling of the MouseUp event (see ZedGraphControl.ZedMouseEventHandler). Return true if you have handled the MouseUp event entirely, and you do not want the ZedGraphControl to do any further action (e.g., starting a zoom operation). Return false if ZedGraph should go ahead and process the MouseUp event.

    | Improve this Doc View Source

    PointEditEvent

    Subscribe to this event to receive notifcation and/or respond after a data point has been edited via IsEnableHEdit and IsEnableVEdit.

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.PointEditHandler PointEditEvent
    Event Type
    Type Description
    ZedGraphControl.PointEditHandler
    Examples

    To subscribe to this event, use the following in your Form_Load method:

    zedGraphControl1.PointEditEvent +=
    new ZedGraphControl.PointEditHandler( MyPointEditHandler );

    Add this method to your Form1.cs:

       private string MyPointEditHandler( object sender, GraphPane pane, CurveItem curve, int iPt )
       {
           PointPair pt = curve[iPt];
           return "This value is " + pt.Y.ToString("f2") + " gallons";
       }
    | Improve this Doc View Source

    PointValueEvent

    Subscribe to this event to provide custom formatting for the tooltips

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.PointValueHandler PointValueEvent
    Event Type
    Type Description
    ZedGraphControl.PointValueHandler
    Examples

    To subscribe to this event, use the following in your FormLoad method:

    zedGraphControl1.PointValueEvent +=
    new ZedGraphControl.PointValueHandler( MyPointValueHandler );

    Add this method to your Form1.cs:

       private string MyPointValueHandler( object sender, GraphPane pane, CurveItem curve, int iPt )
       {
       #region
           PointPair pt = curve[iPt];
           return "This value is " + pt.Y.ToString("f2") + " gallons";
       #endregion
       }
    | Improve this Doc View Source

    ScrollDoneEvent

    Subscribe to this event to be notified when the GraphPane is scrolled by the user using the scrollbars.

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.ScrollDoneHandler ScrollDoneEvent
    Event Type
    Type Description
    ZedGraphControl.ScrollDoneHandler
    | Improve this Doc View Source

    ScrollEvent

    Subscribe to this event to be notified when the GraphPane is scrolled by the user using the scrollbars.

    Declaration
    [Bindable(true)]
    public event ScrollEventHandler ScrollEvent
    Event Type
    Type Description
    ScrollEventHandler
    | Improve this Doc View Source

    ScrollProgressEvent

    Subscribe to this event to be notified when the GraphPane is scrolled by the user using the scrollbars.

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.ScrollProgressHandler ScrollProgressEvent
    Event Type
    Type Description
    ZedGraphControl.ScrollProgressHandler
    | Improve this Doc View Source

    ZoomEvent

    Subscribe to this event to be notified when the GraphPane is zoomed or panned by the user, either via a mouse drag operation or by the context menu commands.

    Declaration
    [Bindable(true)]
    public event ZedGraphControl.ZoomEventHandler ZoomEvent
    Event Type
    Type Description
    ZedGraphControl.ZoomEventHandler

    Implements

    System.ComponentModel.ISynchronizeInvoke
    System.Windows.Forms.IBindableComponent
    System.ComponentModel.IComponent
    System.IDisposable
    System.Windows.Forms.IDropTarget
    System.Windows.Forms.IWin32Window
    System.Windows.Forms.IContainerControl
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX