Code sample that creates one button for each category from NorthWind database table. Click a category button to get products for that category.
There are several images for buttons in the project resources.
- Microsoft Visual Studio 2022 or higher
- NET 8
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; }
}