menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class WorkbookModel - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class WorkbookModel

    Provides the data / model part for an Excel-like Workbook display. A WorkbookModel has a WorksheetModelCollection with multiple WorksheetModels to display in the workbook.

    Inheritance
    System.Object
    WorkbookModel
    Implements
    System.Runtime.Serialization.ISerializable
    System.Runtime.Serialization.IDeserializationCallback
    Namespace: Syncfusion.Windows.Forms
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class WorkbookModel : Component, ISerializable, IDeserializationCallback
    Remarks

    This class can be serialized into a serialization stream.

    Multiple WorkbookView controls can share the same WorkbookModel. Each WorksheetView that is displayed in a WorkbookView is associated with a WorksheetModel from the Worksheets collection in this object.

    Constructors

    WorkbookModel(SerializationInfo, StreamingContext)

    Initializes a new WorkbookModel from a serialization stream.

    Declaration
    protected WorkbookModel(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    An object that holds all the data needed to serialize or deserialize this instance.

    System.Runtime.Serialization.StreamingContext context

    Describes the source and destination of the serialized stream specified by info.

    WorkbookModel(String)

    Initializes a new WorkbookModel and sets a name for the workbook.

    Declaration
    public WorkbookModel(string name)
    Parameters
    Type Name Description
    System.String name

    The name of this workbook.

    Properties

    ActiveView

    Gets / sets the active WorkbookView for this model.

    Declaration
    public object ActiveView { get; set; }
    Property Value
    Type
    System.Object

    Name

    Gets / sets the name for this workbook.

    Declaration
    public string Name { get; set; }
    Property Value
    Type
    System.String

    Worksheets

    Returns the collection with WorksheetModel items.

    Declaration
    public WorksheetModelCollection Worksheets { get; }
    Property Value
    Type
    WorksheetModelCollection

    Methods

    Dispose(Boolean)

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

    OnActiveViewChanged(EventArgs)

    Raises the ActiveViewChanged event.

    Declaration
    protected virtual void OnActiveViewChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Event data.

    OnNameChanged(EventArgs)

    Raises the NameChanged event.

    Declaration
    protected virtual void OnNameChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Event data.

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type
    System.String

    Events

    ActiveViewChanged

    Occurs when the ActiveView has changed.

    Declaration
    public event EventHandler ActiveViewChanged
    Event Type
    Type
    System.EventHandler

    NameChanged

    Occurs when the Name has changed.

    Declaration
    public event EventHandler NameChanged
    Event Type
    Type
    System.EventHandler

    Explicit Interface Implementations

    IDeserializationCallback.OnDeserialization(Object)

    Declaration
    void IDeserializationCallback.OnDeserialization(object sender)
    Parameters
    Type Name Description
    System.Object sender

    ISerializable.GetObjectData(SerializationInfo, StreamingContext)

    Declaration
    void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info
    System.Runtime.Serialization.StreamingContext context

    Implements

    System.Runtime.Serialization.ISerializable
    System.Runtime.Serialization.IDeserializationCallback
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved