I have an empty grid with no data but with all the columns in the XAML - is there way to create multiple of these grids in the code-behinds ie .cs file
I know how to create new grids in the code-behind but not existing grids...any ideas?
Thanks Ram
You can do that by making your "existing grid" a separate
UserControl
.First, you need to add a
UserControl
via [Add]->[User Control...]->[User Control (WPF)].Next, put your "existing grid" inside the added
UserControl
.YourExistingGridControl.xaml
Now, you can create as many instances of that "existing grid" as you like.
YourCodeBehind.xaml.cs