wpf - Is it possible to dynamically create checkbox and specify itsgroupbox/grid and location in C# only? -
i trying create large number of checkboxes , felt not efficient if created them in xaml.
is possible dynamically create checkboxes , specify group box/grid , location in c# only? know can dynamically create check boxes not sure how manage location via c#.
i relatively new wpf, thanks!
most have page has content property should able following
stackpanel panel = new stackpanel(); this.content = panel; panel.children.add(new checkbox()); panel.children.add(new checkbox()); panel.children.add(new checkbox());
i guess can reference them following
checkbox cb = new checkbox(); panel.children.add(cb);
Comments
Post a Comment