AppBar Painters (16 Styles)
16 web header style painters for BeepWebHeaderAppBar — IWebHeaderStylePainter contract, WebHeaderStylePainterBase helpers, plus 8 coordination classes
Table of Contents
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);
}| Method | Description |
|---|---|
PaintHeader | Renders the entire header: background, logo, tabs, search box, action buttons, notifications |
GetTabBounds | Returns the bounding rectangle for a tab at the given index (used for click hit-testing) |
GetButtonBounds | Returns the bounding rectangle for a named action button (e.g., "Search", "Cart", "Profile") |
GetHitElement | Returns 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:
| Helper | Signature | Description |
|---|---|---|
DrawLogo | void DrawLogo(Graphics g, Rectangle bounds, ...) | Renders logo text with optional icon, font styling, and alignment |
DrawLogoCircle | void DrawLogoCircle(Graphics g, Rectangle bounds, ...) | Draws logo inside a circular background with gradient |
DrawLogoPill | void DrawLogoPill(Graphics g, Rectangle bounds, ...) | Draws logo inside a pill/capsule shape with rounded corners |
DrawLogoBadge | void DrawLogoBadge(Graphics g, Rectangle bounds, ...) | Draws logo with a small notification/count badge overlay |
DrawSearchBox | void DrawSearchBox(Graphics g, Rectangle bounds, ...) | Renders a styled search input with placeholder text, icon, and border |
Painter Catalog (16 Total)
| # | Painter Class | Visual Style | Key Features |
|---|---|---|---|
| 1 | StartupHeroPainter | Startup Hero Header | Bold gradient background, centered logo, CTA button, hero tagline, animated background shapes |
| 2 | SaaSProfessionalPainter | SaaS Professional | Clean white/navy theme, left logo + horizontal nav, outlined CTA button, subtle bottom shadow |
| 3 | EcommerceModernPainter | Ecommerce Modern | Full-width banner, prominent search bar, cart icon with badge, category mega-menu dropdowns, sale badge |
| 4 | EcommerceDarkPainter | Ecommerce Dark | Dark theme variant, gold/amber accents, neon cart badge, gradient separator, product category icons |
| 5 | MaterialDesign3Painter | Material Design 3 | Dynamic color from seed, elevated surface with subtle shadow, material ripple on tabs, pill-shaped search field |
| 6 | CorporateMinimalPainter | Corporate Minimal | Single-line header, left logo + right actions, thin bottom border, professional typography, compact layout |
| 7 | CreativeAgencyPainter | Creative Agency | Bold colors, oversized logo, animated hamburger menu, creative typography, diagonal background accent |
| 8 | PortfolioMinimalPainter | Portfolio Minimal | Ultra-minimal with subtle background, centered logo, thin separator, monochrome with accent color hover |
| 9 | MultiRowCompactPainter | Multi-Row Compact | Two-row header: top row = logo + search, bottom row = tabs + actions, compact vertical spacing |
| 10 | MobileFirstPainter | Mobile-First Responsive | Hamburger menu drawer, collapsible search, bottom sticky bar, adaptive tab wrapping, touch-friendly hit targets |
| 11 | MinimalCleanPainter | Minimal Clean | White background, hairline separator, simple logo + nav links, hover underline animation, no shadows |
| 12 | ShoppyStore1Painter | Shoppy Store v1 | Vibrant marketplace header, category grid, promotional banner strip, wishlist heart icon, currency selector |
| 13 | ShoppyStore2Painter | Shoppy Store v2 | Alternate marketplace layout, top promo bar, mega-menu with images, sticky search on scroll, Recently Viewed |
| 14 | StudiofokMinimalPainter | Studiofok Minimal | Art-gallery minimalist style, thin typography, left-aligned logo, minimal navigation, subtle hover reveals |
| 15 | TrendModernPainter | Trend Modern | Gradient glass header, frosted background, modern sans-serif fonts, rounded avatar, notification bell with dot |
| 16 | LegacyHeaderPainter | Legacy Classic | Traditional 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:
| Class | Responsibility |
|---|---|
BeepAppBarMasterHelper | Central orchestrator that coordinates layout, events, drawing, and state management across all sub-helpers |
LayoutHelper | Computes responsive layout: logo position, tab spacing, button alignment, search bar sizing, overflow handling |
EventHelper | Routes mouse clicks, hover, and keyboard events to the appropriate header element (tab, button, search) |
DrawingHelper | Low-level GDI+ drawing utilities: gradient fills, rounded rectangles, text measurement, icon rendering |
DragHelper | Handles drag-drop reordering of tabs within the header bar |
ComponentFactory | Creates and configures child controls (dropdowns, textboxes, buttons) that overlay the painted header |
StateStore | Persists per-header state: active tab index, search text, notification count, collapsed/expanded state |
IBeepAppBarHost | Interface 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);
};