MindFusion.Wpf Pack Programmer's Guide
Workbook View

The WorkbookView control can be used to display Workbook objects on a Windows form. It displays a single worksheet at a time. The other worksheets in the workbook can be accessed through the tabs at the bottom of the view. New sheets can be added interactively by pressing the 'plus' button. The formula bar displays the data of the currently active cell. The following image illustrates the WorkbookView control:

The WorkbookView displays the cells and objects of the worksheet, provides properties for manipulating the active cell and selection, for scrolling the view, for hiding the scrollbars and the worksheet headers, and so on. More specifically the control provides the users the ability to:

The workbook is associated with the view through the Workbook property. The currently active worksheet can be get or set through the ActiveWorksheet property. The currently active cell can be get or set through the ActiveCell property. The cell and object selection can be manipulated through the Selection property. The ScrollX and ScrollY properties can be used to get or set the position of the scrollbars. The worksheet headers can be hidden through the ShowHeaders property. The grid lines can be toggled through the ShowGridLines property. The cursors displayed during various user interactions can be customized through a set of properties: PointerCursor, AutoFillCursor, DiagonalResizeCursor, CounterDiagonalResizeCursor, HorizontalResizeCursor, VerticalResizeCursor, MoveCursor, DisallowCursor, HorizontalSplitCursor, and VerticalSplitCursor.

The view provides many events that can be used to track, validate and respond to user activities in the view. Some of the more interesting ones are listed below. For the complete list of events, check WorkbookView Events.

The view also provides several methods that can be used to auto-size rows and columns based on the cell content, namely, ResizeColumnToFit, ResizeColumnsToFit, ResizeRowToFit, and ResizeRowsToFit.