One approach can be this :
Make a
user control
for every individual tables which have a grid and other facilities prepared in there. Then dynamically load that
user control
into the window which you want to load all controls in there.
For example you can add a
StackPanel
to your main window and add newly created user control to its
Children
based on decision made after your
if
statements.
Have a look at here :
http://stackoverflow.com/questions/1774962/wpf-how-do-i-load-user-controls-dynamically[
^]
Hope it helps.