Monday, July 11, 2011

WPF-how to set label font to Bold from CodeBehind

Label tb = new Label();
tb.Name = "LabelID" + iRow;
tb.Content = lblName;

Grid.SetColumn(tb, iCol);

Grid.SetRow(tb, iRow);
Grid.SetColumnSpan(tb, 2);
tb.Foreground = Brushes.DarkGreen;

tb.Height = 50;

tb.FontSize = 18;

tb.FontWeight = FontWeights.Bold;


gChildGrid.Children.Add(tb);

No comments:

Post a Comment

How to upload app to macOS

1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...