c# - Passing a Wpf control instance to MainWindow Constructor -


assume 'standard' wpf project mainwindow.xaml/cs. default, elements referenced in xaml (such child , , ) created in autogenerated code.

what have can reference instances in xaml, pass actual instances mainwindow constructor?

i have modified app.xaml/cs allow me call mainwindow custom ctor. unsure how set custom instances mainwindow initialization still works.

i managed solve problem follows (probably obvious experienced wpf users):

i simple create parent objects (tabitem etc), , set .content member passed-in reference.


Comments