Kt Button

A modern, fully customizable button control for WinForms, with built-in icon, gradient, and border support.

🟣 PREMIUM

This component is only available in the Premium version of KimTools.

Get KimTools

kt-button-light kt-button-dark

🟒 DESIGNER SUPPORT

This control has full Visual Studio design-time support.
Drag it from the Toolbox onto your form, customize its properties directly in the Properties window, and KimTools will generate the corresponding code for you.

Background

Background Kt-Brush Sets the progress color.

Gradient with Kt-Colors

Use KimTools Semantically named dynamic theme colors.

πŸ”΄ 🟑 🟒
// using KimTools.WinForms;
var button = new KtButton();
button.Text = "Get Started";
	
// Use % operator to apply transparency to Kt-Color
button.Background = Color.BlueViolet;   // Color
                                        // button.Background = KtColor.SUCCESS;     // KtColor
                                        // button.Background = KtColor.PRIMARY % 50; // With Opacity
                                        // button.Background = KtColor.FromHex("#1E90FF"); // Hex
Auto
Light
Dark

solid-background-light solid-background-dark

solid-background-light

solid-background-dark

Gradient Background

Use KimTools Semantic theme colors to match the current global theme.

πŸ”΄ 🟑 🟒
// using KimTools.WinForms;
var button = new KtButton();
button.Text = "Upgrade to Pro";
button.Size = new Size(200, 50);
// Background supports Kt-Color gradients with an optional angle
button.Background =
(
    startColor: KtColor.PRIMARY[50],
    stopColor: KtColor.SECONDARY[50],
    angle: 45 // optional (0-360)
);
Auto
Light
Dark

gradient-background-light gradient-background-dark

gradient-background-light

gradient-background-dark

Border

Border Kt-Brush Sets the panel’s border color.

Outlined Border

Clear Background and set Border for a ghost/outline button.

πŸ”΄ 🟑 🟒
// using KimTools.WinForms;
var button = new KtButton();
button.Text = "Cancel";
	
// Clear Background and set Border for a ghost/outline style
button.Background = KtBrush.None;
button.Border = KtColor.PRIMARY;
button.BorderWidth = 2f;
Auto
Light
Dark

outlined-button-light outlined-button-dark

outlined-button-light

outlined-button-dark

Outlined Gradient Border

Clear Background and set Border for a gradient outline button.

πŸ”΄ 🟑 🟒
// using KimTools.WinForms;
var button = new KtButton();
button.Text = "Cancel";
	
// Clear Background and set Border for a ghost/outline style
button.Background = KtBrush.None;
button.Border =("red","blue");
button.BorderWidth = 2f;
Auto
Light
Dark

outlined-gradient-button-light outlined-gradient-button-dark

outlined-gradient-button-light

outlined-gradient-button-dark

Dashed BorderStyle

Clear Background and set BorderStyle for a gradient Dash border.

πŸ”΄ 🟑 🟒
// using KimTools.WinForms;
var button = new KtButton();
button.Text = "Cancel";
	
// Clear Background and set Border for a ghost/outline style
button.Background = KtBrush.None;
button.Border = ("red", "blue");
button.BorderWidth = 2f;
button.BorderStyle = DashStyle.DashDot;
Auto
Light
Dark

outlined-gradient-dashed-button-light outlined-gradient-dashed-button-dark

outlined-gradient-dashed-button-light

outlined-gradient-dashed-button-dark

Border Radius

Set BorderRadius from 0 (square) to .99f (pill) or >1 (int) for actual pixels.

πŸ”΄ 🟑 🟒
// using KimTools.WinForms;
var button = new KtButton();
button.Text = "Subscribe";
button.Background = KtColor.PRIMARY;
	
// BorderRadius runs 0 (square) .. .99f (fully pill-shaped)
button.BorderRadius = .99f;
button.BorderRadius = 5f; // Actual pixels
Auto
Light
Dark

rounded-button-light rounded-button-dark

rounded-button-light

rounded-button-dark

SVG Icon

Set Icon to a Tabler icon name; IconSize and IconStroke control its rendering.

πŸ”΄ 🟑 🟒
// using KimTools.WinForms;
var button = new KtButton();
button.Text = "Download";
	
// Icon accepts a Tabler icon name; IconSize / IconStroke tune its rendering
button.Icon = "download";
button.IconSize = 18;
button.IconStroke = 2.5;
button.Width = 150;
Auto
Light
Dark

icon-text-button-light icon-text-button-dark

icon-text-button-light

icon-text-button-dark

Rounded Icon Button

Set Icon to a Tabler icon name; IconSize and IconStroke control its rendering.

πŸ”΄ 🟑 🟒
// using KimTools.WinForms;
var button = new KtButton();
button.Text = string.Empty;
button.ImageAlign = ContentAlignment.MiddleCenter;
button.Size = new Size(50, 50);
button.Padding = Padding.Empty;
// Icon accepts a Tabler icon name; IconSize / IconStroke tune its rendering
button.Icon = "sparkles";
button.IconSize = 18;
button.IconStroke = 2.5;
button.BorderRadius = .99f;
button.Height = 50;
Auto
Light
Dark

icon-button-light icon-button-dark

icon-button-light

icon-button-dark

TextAlign + ImageAlign

Move the icon to the trailing edge by pairing ImageAlign with TextAlign.

πŸ”΄ 🟑 🟒
// using KimTools.WinForms;
var button = new KtButton();
button.Text = "Continue";
button.Icon = "check";
// button.Icon = "arrow-right";
	
// Reposition the icon and label independently
button.ImageAlign = ContentAlignment.MiddleRight;
button.TextAlign = ContentAlignment.MiddleLeft;
Auto
Light
Dark

text-icon-align-light text-icon-align-dark

text-icon-align-light

text-icon-align-dark

Foreground + IconColor

Override the label and icon color independently of the current theme.

πŸ”΄ 🟑 🟒
// using KimTools.WinForms;
var button = new KtButton();
button.Text = "Learn more";
button.Icon = "sparkles";
button.Width = 160;
// Foreground and IconColor override the label/icon color independently of Background
button.Background = KtBrush.None;
button.Foreground = KtColor.PRIMARY;
button.IconColor = KtColor.PRIMARY;
Auto
Light
Dark

custom-foreground-light custom-foreground-dark

custom-foreground-light

custom-foreground-dark

API Reference

Background Kt-Brush Sets the progress color.
Border Kt-Brush Sets the panel’s border color.
BorderEdges Edges Sets the Border edges.
Foreground Kt-Color Sets the Foreground.
IconColor Kt-Color Sets the Icon color.
Pattern Kt-Pattern Sets the Pattern.
IconStroke Double Sets the Icon stroke.
ImageAlign ContentAlignment The alignment of the image that will be displayed on the control.
TextAlign ContentAlignment The alignment of the text that will be displayed on the control.
BorderStyle DashStyle Sets the panel’s border style.
IconSize Int32 Sets the Icon size.
BorderRadius float Nullable Sets the Border radius.
BorderWidth float Sets the Border width.
Icon String Sets the Icon.
Value String Sets the Value.
Cursor Cursor The cursor that appears when the pointer moves over the control.
BorderMargin Padding Sets the border Margin.
Padding Padding Specifies the interior spacing of a control.