Overview

The BeepWebHeaderAppBar control provides a web-style application header bar with 16 distinct visual styles, each implemented as a painter class conforming to IWebHeaderStylePainter. Every painter extends WebHeaderStylePainterBase, which provides shared drawing primitives for logos, search boxes, tabs, and buttons.

The styles range from startup hero headers to SaaS professional, ecommerce, material design, multi-row compact, and mobile-first layouts. Each style controls header background, logo rendering, tab/breadcrumb rendering, search bar, action buttons, and responsive layout behavior.

IWebHeaderStylePainter Contract

public interface IWebHeaderStylePainter
{
    void PaintHeader(Graphics g, Rectangle bounds, WebHeaderAppBarConfig config);
    Rectangle GetTabBounds(int index, Rectangle headerBounds, WebHeaderAppBarConfig config);
    Rectangle GetButtonBounds(string buttonKey, Rectangle headerBounds, WebHeaderAppBarConfig config);
    string GetHitElement(Point point, Rectangle headerBounds, WebHeaderAppBarConfig config);
}
MethodDescription
PaintHeaderRenders the entire header: background, logo, tabs, search box, action buttons, notifications
GetTabBoundsReturns the bounding rectangle for a tab at the given index (used for click hit-testing)
GetButtonBoundsReturns the bounding rectangle for a named action button (e.g., "Search", "Cart", "Profile")
GetHitElementReturns a string identifying which UI element is at the given point: "Logo", "Tab:0", "Search", "Cart", etc.

WebHeaderStylePainterBase

All 16 painters extend WebHeaderStylePainterBase, which provides 5 shared helper methods:

HelperSignatureDescription
DrawLogovoid DrawLogo(Graphics g, Rectangle bounds, ...)Renders logo text with optional icon, font styling, and alignment
DrawLogoCirclevoid DrawLogoCircle(Graphics g, Rectangle bounds, ...)Draws logo inside a circular background with gradient
DrawLogoPillvoid DrawLogoPill(Graphics g, Rectangle bounds, ...)Draws logo inside a pill/capsule shape with rounded corners
DrawLogoBadgevoid DrawLogoBadge(Graphics g, Rectangle bounds, ...)Draws logo with a small notification/count badge overlay
DrawSearchBoxvoid DrawSearchBox(Graphics g, Rectangle bounds, ...)Renders a styled search input with placeholder text, icon, and border

Painter Catalog (16 Total)

#Painter ClassVisual StyleKey Features
1StartupHeroPainterStartup Hero HeaderBold gradient background, centered logo, CTA button, hero tagline, animated background shapes
2SaaSProfessionalPainterSaaS ProfessionalClean white/navy theme, left logo + horizontal nav, outlined CTA button, subtle bottom shadow
3EcommerceModernPainterEcommerce ModernFull-width banner, prominent search bar, cart icon with badge, category mega-menu dropdowns, sale badge
4EcommerceDarkPainterEcommerce DarkDark theme variant, gold/amber accents, neon cart badge, gradient separator, product category icons
5MaterialDesign3PainterMaterial Design 3Dynamic color from seed, elevated surface with subtle shadow, material ripple on tabs, pill-shaped search field
6CorporateMinimalPainterCorporate MinimalSingle-line header, left logo + right actions, thin bottom border, professional typography, compact layout
7CreativeAgencyPainterCreative AgencyBold colors, oversized logo, animated hamburger menu, creative typography, diagonal background accent
8PortfolioMinimalPainterPortfolio MinimalUltra-minimal with subtle background, centered logo, thin separator, monochrome with accent color hover
9MultiRowCompactPainterMulti-Row CompactTwo-row header: top row = logo + search, bottom row = tabs + actions, compact vertical spacing
10MobileFirstPainterMobile-First ResponsiveHamburger menu drawer, collapsible search, bottom sticky bar, adaptive tab wrapping, touch-friendly hit targets
11MinimalCleanPainterMinimal CleanWhite background, hairline separator, simple logo + nav links, hover underline animation, no shadows
12ShoppyStore1PainterShoppy Store v1Vibrant marketplace header, category grid, promotional banner strip, wishlist heart icon, currency selector
13ShoppyStore2PainterShoppy Store v2Alternate marketplace layout, top promo bar, mega-menu with images, sticky search on scroll, Recently Viewed
14StudiofokMinimalPainterStudiofok MinimalArt-gallery minimalist style, thin typography, left-aligned logo, minimal navigation, subtle hover reveals
15TrendModernPainterTrend ModernGradient glass header, frosted background, modern sans-serif fonts, rounded avatar, notification bell with dot
16LegacyHeaderPainterLegacy ClassicTraditional 2D header with gradient, raised tab buttons, classic Windows Forms look, beveled edges

Helper Classes (8)

The AppBar system is supported by 8 coordination and utility classes:

ClassResponsibility
BeepAppBarMasterHelperCentral orchestrator that coordinates layout, events, drawing, and state management across all sub-helpers
LayoutHelperComputes responsive layout: logo position, tab spacing, button alignment, search bar sizing, overflow handling
EventHelperRoutes mouse clicks, hover, and keyboard events to the appropriate header element (tab, button, search)
DrawingHelperLow-level GDI+ drawing utilities: gradient fills, rounded rectangles, text measurement, icon rendering
DragHelperHandles drag-drop reordering of tabs within the header bar
ComponentFactoryCreates and configures child controls (dropdowns, textboxes, buttons) that overlay the painted header
StateStorePersists per-header state: active tab index, search text, notification count, collapsed/expanded state
IBeepAppBarHostInterface that the parent form implements to receive header events (tab clicks, search submit, button clicks)

Examples

Header Style Switching

var appBar = new BeepWebHeaderAppBar();

appBar.LogoText = "MyApp";
appBar.Pages = new[] { "Dashboard", "Reports", "Settings", "Admin" };

appBar.HeaderStyle = HeaderStyle.SaaSProfessional;

appBar.HeaderStyle = HeaderStyle.EcommerceModern;
appBar.ShowSearchBox = true;
appBar.NotificationCount = 5;

appBar.HeaderStyle = HeaderStyle.MaterialDesign3;

appBar.HeaderStyle = HeaderStyle.StartupHero;

appBar.HeaderStyle = HeaderStyle.MultiRowCompact;
appBar.SearchPlaceholder = "Search everything...";

appBar.Host = this;
appBar.TabClicked += (s, e) =>
{
    var pageName = appBar.Pages[e.TabIndex];
    NavigateToPage(pageName);
};