Guide for implementing Syncfusion Office2007Form in Windows Forms applications for creating Microsoft Office-styled forms. Use this skill when implementing Office 2007 UI styling, applying Office color schemes, or customizing form appearance in Windows Forms. Covers installation, theming, caption customization, and AeroTheme configuration.
The Syncfusion Office2007Form is an advanced Windows Forms control that provides Microsoft Office 2007/2010-inspired UI and appearance. It transforms standard forms into modern, visually appealing interfaces with built-in color schemes, caption customization, and Office-style theming.
Use this skill when you need to:
Office2007Form replaces the standard System.Windows.Forms.Form by inheritance, providing:
Required Package:
Installation via NuGet:
Install-Package Syncfusion.Shared.Base
Or use Visual Studio's NuGet Package Manager to search for "Syncfusion.Shared.Base"
Required Assembly Reference:
Syncfusion.Shared.Base.dllRequired Namespace:
using Syncfusion.Windows.Forms;
📄 Read: references/getting-started.md
📄 Read: references/color-schemes.md
📄 Read: references/advanced-features.md
Prerequisites:
Syncfusion.Shared.Base NuGet packageSyncfusion.Shared.Base.dll in your projectusing Syncfusion.Windows.Forms; namespaceusing System;
using System.Drawing;
using System.Windows.Forms;
using Syncfusion.Windows.Forms; // Required: Syncfusion.Shared.Base package
namespace MyApplication
{
// Inherit from Office2007Form instead of Form
public partial class MainForm : Office2007Form
{
public MainForm()
{
InitializeComponent();
// Set basic properties
this.Text = "My Office 2007 Application";
this.Size = new Size(800, 600);
// Apply Blue color scheme
this.ColorScheme = Office2007Theme.Blue;
// Optional: Use scheme background color
this.UseOffice2007SchemeBackColor = true;
}
}
}
public partial class CustomForm : Office2007Form
{
public CustomForm()
{
InitializeComponent();
this.Text = "Customized Office Form";
// Apply color scheme
this.ColorScheme = Office2007Theme.Silver;
// Customize caption
this.CaptionAlign = HorizontalAlignment.Center;
this.CaptionFont = new Font("Segoe UI", 12F, FontStyle.Bold);
this.CaptionForeColor = Color.DarkBlue;
this.CaptionBarHeight = 40;
}
}
public partial class ManagedColorForm : Office2007Form
{
public CustomForm()
{
InitializeComponent();
this.Text = "Custom Color Theme";
// Apply managed scheme with custom color
this.ColorScheme = Office2007Theme.Managed;
Office2007Colors.ApplyManagedColors(this, Color.DarkMagenta);
this.UseOffice2007SchemeBackColor = true;
}
}
Most common use case - apply built-in Office theme:
public class MyForm : Office2007Form
{
public MyForm()
{
InitializeComponent();
this.Text = "My Application";
this.ColorScheme = Office2007Theme.Blue; // or Silver, Black
this.UseOffice2007SchemeBackColor = true;
}
}
Customize caption bar for branding:
public class BrandedForm : Office2007Form
{
public BrandedForm()
{
InitializeComponent();
// Apply theme
this.ColorScheme = Office2007Theme.Black;
// Brand the caption
this.CaptionAlign = HorizontalAlignment.Center;
this.CaptionFont = new Font("Arial", 14F, FontStyle.Bold);
this.CaptionForeColor = Color.Gold;
this.CaptionBarHeight = 45;
this.CaptionBarHeightMode =
Syncfusion.Windows.Forms.Enums.CaptionBarHeightMode.SameAlwaysOnMaximize;
}
}
Use your brand color:
public class CustomBrandForm : Office2007Form
{
public CustomBrandForm()
{
InitializeComponent();
this.Text = "Brand Color Application";
// Use company brand color
this.ColorScheme = Office2007Theme.Managed;
Color brandColor = Color.FromArgb(0, 120, 215); // Custom blue
Office2007Colors.ApplyManagedColors(this, brandColor);
this.UseOffice2007SchemeBackColor = true;
}
}
When you need color schemes on Vista/7 with Aero:
public class NoAeroForm : Office2007Form
{
public NoAeroForm()
{
InitializeComponent();
// Disable Aero to allow color scheme
this.ApplyAeroTheme = false;
// Now apply your color scheme
this.ColorScheme = Office2007Theme.Silver;
}
}
Modern rounded appearance on Windows 11:
public class ModernForm : Office2007Form
{
public ModernForm()
{
InitializeComponent();
this.Text = "Modern Application";
this.ColorScheme = Office2007Theme.Blue;
// Enable rounded corners (Windows 11 only)
this.AllowRoundedCorners = true;
}
}
For right-to-left languages:
public class RtlForm : Office2007Form
{
public RtlForm()
{
InitializeComponent();
this.Text = "تطبيق"; // Arabic text
this.ColorScheme = Office2007Theme.Blue;
// Enable RTL
this.RightToLeft = RightToLeft.Yes;
this.RightToLeftLayout = true;
}
}
| Property | Type | Description |
|---|---|---|
ColorScheme | Office2007Theme | Sets color scheme: Blue, Silver, Black, Managed |
CaptionAlign | HorizontalAlignment | Caption text alignment (Left, Center, Right) |
CaptionFont | Font | Caption bar font style |
CaptionForeColor | Color | Caption text color |
CaptionBarHeight | int | Height of caption bar in pixels |
CaptionBarHeightMode | CaptionBarHeightMode | Height behavior in maximized state |
UseOffice2007SchemeBackColor | bool | Match form background to color scheme |
ApplyAeroTheme | bool | Enable/disable Aero glass effect |
AllowRoundedCorners | bool | Rounded corners (Windows 11 only) |
RightToLeft | RightToLeft | RTL text direction |
RightToLeftLayout | bool | RTL layout mirroring |
DisableOffice2007Style | bool | Revert to standard form appearance |
HelpButton | bool | Show help button in caption bar |
public partial class MyForm : Form
{
public MyForm()
{
InitializeComponent();
this.Text = "My Application";
}
}
public partial class MyForm : Office2007Form
{
public MyForm()
{
InitializeComponent();
this.Text = "My Application";
this.ColorScheme = Office2007Theme.Blue;
this.UseOffice2007SchemeBackColor = true;
}
}
Required Changes:
Form to Office2007Formusing Syncfusion.Windows.Forms;Syncfusion.Shared.Base.dllColorScheme property (optional but recommended)ApplyAeroTheme is enabled; set to false to use color schemes on Vista/7CaptionBarHeightMode = SameAlwaysOnMaximizeSyncfusion.Shared.Base.dll is referenced and NuGet package installed