Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  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]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]Spreadsheet Formulas
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
    Data Grouping
   [Expand]Pivot Table Overview
   [Expand]Charting Overview
    Shapes
    Printing
    Events
   [Expand]Mail Merge Overview
    Protection
    Find and Replace
   [Expand]Visual Elements
    Services
   [Expand]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]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]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

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.18.1: Spreadsheet toolbox tab onto the form.

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

  4. Select Create FormulaBar in the SpreadsheetControl Tasks menu. This automatically adds the SpreadsheetFormulaBar control to the form and binds it to the SpreadsheetControl.

Expanded Create Ribbon Pages

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

  2. Add necessary ribbon pages from 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 by changing the ribbon style, adding new ribbon elements, modifying or removing the existing items. The default ribbon style is Office2013.

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

Run the spreadsheet application to view the result. For example, load a workbook, enter cell values, create formulas, apply cell formatting, and explore various ribbon items.

Note

Commands executed via the ribbon user interface can throw unhandled exceptions if a problem occurs. For instance, when a document is being saved to a locked or read-only file. To prevent an application from failing, 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

    Apply a skin to

    At design time

    In code

    Entire application

    Invoke the DevExpress Project Settings page and select a desired skin from the Skin Name list.

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

    SpreadsheetControl

    Locate the LookAndFeel option in the Properties window.

    Set the UseDefaultLookAndFeel property to False, and the SkinName property to the required skin.

    Use the SpreadsheetControl.LookAndFeel property to access an object specifying the control's look and feel settings.

  • Use bitmap or vector icons

    The spreadsheet application uses vector icons by default, which ensures that the application is rendered correctly on high-DPI devices.

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

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

    SVG Icons

    Bitmap Icons

Expanded See Also

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