How do I programmatically set the content of the viewport?

I'm surprised I can't find this through googling, but I have a viewport in a WPF window and I would like to add a UserControl to it through code. The viewport is empty, it just appears to "wait for the spinner" during certain events (I'm tired of looking at it at the design and would just like to insert it there via code).

I expected there to be something like Viewbox.Content but there is no such luck

+3


source to share


1 answer


ViewBox.Child = new BlahMaster2000();

      



+19


source







All Articles