karenpayneoregon / dynamic-buttons-windows

Shows how to create dynamic buttons via SQL-Server for Windows Forms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynamic buttons

Code sample that creates one button for each category from NorthWind database table. Click a category button to get products for that category.

Screen shot

There are several images for buttons in the project resources.

screen

Schema

shot

Requires

  • Microsoft Visual Studio 2022 or higher
  • NET 8

Data Operations

Dapper

Logging

SeriLog

Custom button

Identifier property is used to store category identifier rather than using the tag propery.

public class DataButton : Button
{
    [Category("Behavior"), Description("Identifier")]
    public int Identifier { get; set; }
    [Category("Behavior"), Description("Stash")]
    public string Stash { get; set; }
}

About

Shows how to create dynamic buttons via SQL-Server for Windows Forms


Languages

Language:C# 100.0%