How to make button text bold?

c#, winforms

Solution

Windows Forms:

var b = new Button()
{
    Location = new Point(x * 30, y * 30),
    //...
};
b.Font = new Font(b.Font.Name, b.Font.Size, FontStyle.Bold);

WPF:

var b = new Button()
{
    Location = new Point(x * 30, y * 30),
    //...
    FontWeight = FontWeights.Bold
};

ASP.NET

var b = new Button()
{
    Location = new Point(x * 30, y * 30),
    //...
};
b.Font.Bold = true;

Problem

I want to have the text on my dynamicly added buttons bold. How do I do that? Here is my code: ``` var b = new Button() { Location = new Point(x * 30, y * 30), Width = 30, Height = 30, Tag = new Point(y, x), // game location x, y BackColor = Color.SkyBlue, }; ```

Original source