Class WorkbookForm
A form that hosts a WorkbookView. The WorkbookView fills the whole form.
Inheritance
Implements
Namespace: Syncfusion.Windows.Forms
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class WorkbookForm : Form, IThemedControl
Examples
public class NewWorkbookFile : BasicAction
{
int windowCount = 0;
WorkbookModel workbook;
public override void InvokeAction(object sender, EventArgs e)
{
windowCount++;
workbook = new WorkbookModel("Workbook");
GridModel sheet1 = new GridModel();
SampleGrid.SetupGridModel(sheet1);
GridModel sheet2 = new GridModel();
SampleGrid.SetupGridModel(sheet2);
workbook.Worksheets.Add(new WorksheetModel(workbook, "Sheet 1", sheet1));
workbook.Worksheets.Add(new WorksheetModel(workbook, "Sheet 2", sheet2));
WorkbookForm doc = new WorkbookForm(workbook);
doc.Text = workbook.Name + windowCount;
doc.MdiParent = MainWindow;
doc.Show();
}
}
Constructors
WorkbookForm()
Initializes a new WorkbookForm.
Declaration
protected WorkbookForm()
WorkbookForm(WorkbookModel)
Initializes a new WorkbookForm and associates it with a new default WorkbookView that is created for the specified WorkbookModel.
Declaration
public WorkbookForm(WorkbookModel workbookModel)
Parameters
Type | Name | Description |
---|---|---|
WorkbookModel | workbookModel | The model for the workbook view to be displayed in the form. |
WorkbookForm(WorkbookView)
Overloaded. Initializes a new WorkbookForm and associates it with a WorkbookView.
Declaration
public WorkbookForm(WorkbookView workbookView)
Parameters
Type | Name | Description |
---|---|---|
WorkbookView | workbookView | The view to be displayed in the form. |
Properties
ThemesEnabled
Indicates whether themes are enabled for this control.
Declaration
public virtual bool ThemesEnabled { get; set; }
Property Value
Type |
---|
System.Boolean |
WorkbookView
Gets / sets the view that is displayed in the form.
Declaration
public WorkbookView WorkbookView { get; set; }
Property Value
Type |
---|
WorkbookView |
Methods
Dispose(Boolean)
Cleans up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
OnThemeChanged(EventArgs)
Raises the ThemeChanged event.
Declaration
protected virtual void OnThemeChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnThemeChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Note to Inheritors: When overriding OnThemeChanged in a derived class, be sure to call the base class's OnThemeChanged method so that registered delegates receive the event.
Events
ThemeChanged
Fired when the ThemesEnabled property changes.
Declaration
public event EventHandler ThemeChanged
Event Type
Type |
---|
System.EventHandler |