[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Collapse]Spreadsheet
   [Expand]Product Information
    Product Structure
    Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
   [Expand]Formulas
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
    Data Grouping
   [Expand]Pivot Tables
   [Expand]Charts and Graphics
    Printing
    Events
   [Expand]Mail Merge
    Protection
    Operation Restrictions
    Find and Replace
   [Expand]Visual Elements
    Services
   [Expand]Keyboard Shortcuts
   [Expand]Examples
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Getting Started

This tutorial describes how to create a simple spreadsheet application with a ribbon interface and adjust its appearance

Expanded Create a Spreadsheet Application

  1. Start Visual Studio and create a new Windows Forms Application project.
  2. Drop the SpreadsheetControl item from the DX.19.2: Spreadsheet toolbox tab onto the form.

  3. Click the SpreadsheetControl's smart tag and select Dock in Parent Container in the SpreadsheetControl Tasks menu. This allows the SpreadsheetControl to expand to the form's size.

  4. Select Create Formula Bar in the SpreadsheetControl Tasks menu. This action adds the SpreadsheetFormulaBar control to the form and binds it to the SpreadsheetControl.

Expanded Create Ribbon Pages

Design Time

  1. Select Create Ribbon in the SpreadsheetControl Tasks menu to add a RibbonControl to the spreadsheet.

  2. Select necessary ribbon pages in the SpreadsheetControl Tasks menu or click Create All Bars to add all available spreadsheet ribbon pages at once. You can customize the created ribbon afterward: change the ribbon style, add new ribbon elements, modify or remove the existing items.

  3. Click the RibbonControl's smart tag and select Convert To Ribbon Form in the RibbonControl Tasks menu to convert the application form to a Ribbon Form.

Runtime

Use the SpreadsheetControl.CreateRibbon method overloads to add a ribbon to the Spreadsheet control at runtime.

Expanded Add a Status Bar

Design Time

  1. After you generate a ribbon, you can add a status bar to your Spreadsheet application. Click the SpreadsheetControl's smart tag and select Create Status Bar in the SpreadsheetControl Tasks menu.

The created status bar contains all the available items (listed in the SpreadsheetStatusBarItems enumeration). You can add new elements to the status bar, remove existing items, or delete the entire status bar.

Runtime

Use the SpreadsheetControl.CreateRibbonStatusBar method overloads to add a status bar to the Spreadsheet application with a Ribbon UI.

Expanded Result

Run the application and try the Spreadsheet features. Load a workbook, enter cell values, create Formulas, and apply cell formatting.

Note

Commands executed via the ribbon UI can throw unhandled exceptions if a problem occurs. For instance, when a user saves a document to a locked or read-only file. To avoid this, subscribe to the SpreadsheetControl.UnhandledException event and set the SpreadsheetUnhandledExceptionEventArgs.Handled property to true.

Expanded Change the Application's Appearance

Change the Application's Skin

At Design Time

In Code

Invoke the DevExpress Project Settings page and select a skin in the Skin Options group.

Call the UserLookAndFeel.Default static object's UserLookAndFeel.SetSkinStyle method:

Use Bitmap or Vector Icons

The newly created spreadsheet application uses vector icons. This ensures the application is rendered correctly on high-DPI devices.

Set the static WindowsFormsSettings.AllowDefaultSvgImages property to DefaultBoolean.False at the application's startup to use bitmap icons in your application.

The following images illustrate the Spreadsheet's ribbon UI with default vector and bitmap icons:

  • SVG Icons

  • Bitmap Icons

Use Skinned Open and Save File Dialogs

Replace standard WinForms Open and Save dialogs with their skinned DevExpress counterparts.

Set the static WindowsFormsSettings.UseDXDialogs property to DefaultBoolean.True at the application's startup to enable DevExpress Open/Save dialogs in your application.

Note

Ensure your project contains all the assemblies skinned DevExpress dialogs require. Refer to the Deployment topic for the assembly list.

Expanded See Also

Is this topic helpful?​​​​​​​