Permalink
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (42 sloc) 2.94 KB
title ms.custom ms.date ms.prod ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
How to: Create a Professionally Styled ToolStrip Control
03/30/2017
.net-framework
dotnet-winforms
article
jsharp
toolbars [Windows Forms]
ToolStripProfessionalRenderer class [Windows Forms]
ToolStripRenderer class [Windows Forms]
ToolStrip control [Windows Forms]
c208b2f6-8105-474b-9075-d582e1792870
9
dotnet-bot
dotnetcontent
wpickett

How to: Create a Professionally Styled ToolStrip Control

You can give your application’s xref:System.Windows.Forms.ToolStrip controls a professional appearance and behavior (look and feel) by writing your own class derived from the xref:System.Windows.Forms.ToolStripProfessionalRenderer type.

There is extensive support for this feature in [!INCLUDEvsprvs].

See Walkthrough: Creating a Professionally Styled ToolStrip Control.

Example

The following code example demonstrates how to use xref:System.Windows.Forms.ToolStrip controls to create a composite control that mimics the Navigation Pane provided by Microsoft® Outlook®.

[!code-csharpSystem.Windows.Forms.ToolStrip.StackView#1] [!code-vbSystem.Windows.Forms.ToolStrip.StackView#1]

Compiling the Code

This example requires:

  • References to the System.Drawing and System.Windows.Forms assemblies.

For information about building this example from the command line for [!INCLUDEvbprvb] or [!INCLUDEcsprcs], see Building from the Command Line or Command-line Building With csc.exe. You can also build this example in [!INCLUDEvsprvs] by pasting the code into a new project. Also see Walkthrough: Creating a Professionally Styled ToolStrip Control.

See Also

xref:System.Windows.Forms.MenuStrip
xref:System.Windows.Forms.ToolStrip
xref:System.Windows.Forms.StatusStrip
ToolStrip Control
How to: Provide Standard Menu Items to a Form