William Thompson

William Thompson

  • 1.6k
  • 155
  • 299.6k

In C# (or in C# with WPF), how would I build a checkbox at run time?

Jun 26 2010 7:42 PM

In C# (or in C# with WPF), how would I build a checkbox at run time? I would I be able to query the check box to see if the user clicked on it?
In other words, suppose I have a "grid" on which I want to have displayed some checkboxes. But I do not know how many checkboxes to display. I suppose I could (in WPF) fill the grid with checkboxes at design time and mark them as hidden (or visibly == false) and then show them at run time. But I was hoping there was a more elegant way to do this.

Answers (1)