Overview

Migrating from standard WinForms controls to Beep Controls is straightforward. Most Beep controls are drop-in replacements for their standard counterparts, with added theming, styling, and modern appearance.

Control Mapping

Standard WinForms Beep Replacement
ButtonBeepButton
TextBoxBeepTextBox
ComboBoxBeepComboBox
CheckBoxBeepCheckBox
RadioButtonBeepRadioButton
LabelBeepLabel
PanelBeepPanel
TabControlBeepTabControl
DataGridViewBeepSimpleGrid
ProgressBarBeepProgressBar
TreeViewBeepTree

Step-by-Step Migration

1. Replace Using Statements

Update using statements

// Before
using System.Windows.Forms;

// After — add this alongside the existing using
using TheTechIdea.Beep.Winform.Controls;

2. Replace Control Types

Replace standard controls with Beep controls

// Before
private Button submitButton;
this.submitButton = new Button();
this.submitButton.Text = "Submit";

// After
private BeepButton submitButton;
this.submitButton = new BeepButton();
this.submitButton.Text = "Submit";

3. Replace Your Main Form with BeepiFormPro

Inherit BeepiFormPro instead of Form

// Before
public partial class MainForm : Form { ... }

// After — inherit BeepiFormPro for modern custom-drawn window
using TheTechIdea.Beep.Winform.Controls.Forms.ModernForm;

public class MainForm : BeepiFormPro
{
    public MainForm()
    {
        Text = "My App";
        Size = new Size(800, 600);
        FormStyle = FormStyle.Material; // 35+ styles available
    }
}

4. Initialize Theming

Add theme initialization to Program.cs

// Add to Program.cs before Application.Run()
using TheTechIdea.Beep.Winform.Controls.ThemeManagement;

BeepThemesManager.InitializeThemes();  // Auto-discovers all IBeepTheme from assemblies
// Optionally apply a specific theme:
// BeepThemesManager.ApplyTheme("MaterialBlue");

Key Differences

  • Theming — All Beep controls automatically follow the active theme
  • BaseControl — Beep controls inherit from BaseControl instead of Control
  • Custom Painting — Beep controls use owner-draw for consistent appearance across themes
  • Images — Use ImagePath (string path) instead of Image property

Tips

  • Migrate one form at a time to reduce risk
  • Standard and Beep controls can coexist in the same form during migration
  • Test theme switching after migration to verify all controls respond correctly