Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programatically set the content of a Viewbox?

Tags:

c#

wpf

I'm surprised I can't find this through googling, but I have a Viewbox in a WPF window and I'd like to add a UserControl to it through code. The viewbox is empty, it's simply there to have a "wait spinner" pop up during certain events (I got tired of looking at it on the design view and would just like to stick it in there via code).

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

like image 604
cost Avatar asked Apr 02 '12 03:04

cost


1 Answers

ViewBox.Child = new BlahMaster2000();
like image 149
Ritch Melton Avatar answered Nov 04 '22 17:11

Ritch Melton