| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A drop‑in replacement for WinForms’ built‑in TabControl that removes the OS‑drawn border, paints its own buttons (owner‑draw), and keeps the page area truly transparent so the parent control can shine through.
| Feature | Details |
|---|---|
| Borderless Look | Strips the standard window border and client edge. |
| Owner-drawn Tabs | Renders its own buttons, bevels, separators, and pressed/selected states. |
| Transparent Page Area | Lets the parent control’s background shine through. |
| Uniform Heights | Forces TabAppearance.Normal to 24 px so it lines up with Buttons/FlatButtons. |
| Per-tab Theming | Store a BorderlessTabControl.TabColorInfo in TabPage.Tag to change the caption and face color individually. |
| Pixel-perfect Images | Enable NearestNeighborStretch to scale pixel-art backgrounds without blur. |
| One-liner Theming | Call RecolorAllTabs(ThemeMode.Dark|Light) to recolor every tab. |
ℹ️ No NuGet package (yet) – it’s a single self-contained file.
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
var tabs = new BorderlessTabControl
{
Dock = DockStyle.Fill, // Or wherever you like.
Appearance = TabAppearance.FlatButtons
};
tabs.TabPages.Add("Home");
tabs.TabPages.Add("Settings");
Controls.Add(tabs);
}
}var page1 = Main_BorderlessTabControl.TabPages[0];
page1.Tag = new BorderlessTabControl.TabColorInfo(page1)
{
TextFore = Color.White, // Caption (text) color.
FaceBack = Color.SteelBlue, // Button background.
PageBack = Color.AliceBlue // Optional: Page background.
};using BorderlessTabControlExample; // Extension lives in the classes namespace.
Main_BorderlessTabControl.RecolorAllTabs(BorderlessTabControlExtensions.ThemeMode.Dark);Main_BorderlessTabControl.NearestNeighborStretch = true;
page1.BackgroundImage = Properties.Resources.PixelBackdrop;| Property | Type | Purpose |
|---|---|---|
| NearestNeighborStretch | bool | When true, stretches TabPage.BackgroundImage with nearest‑neighbor interpolation (crisp pixels). Default false (high‑quality bicubic). |
BorderlessTabControl intentionally keeps its surface area small—most behaviour is internal.
Anything you can do with the base TabControl still applies (add/remove pages, handle Selecting, etc.).
Main_BorderlessTabControl.RecolorAllTabs(BorderlessTabControlExtensions.ThemeMode.Dark);| Helper | What it does |
|---|---|
| RecolorAllTabs(ThemeMode theme) | Iterates every TabPage and assigns dark/light FaceBack + TextFore colors without touching Page.BackColor. |
BorderlessTabControl.cs is licensed under GNU General Public License v3.0.
See the root LICENSE file for the full text.
Original author: RussDev7
Special thanks to the WinForms community for years of owner‑draw inspiration.
(Images showing the standard vs. borderless tab control.)
Found a bug or have an idea? Open an issue or pull request—contributions welcome!
| Back | FazBrowse Home | New Git URL |