I\'m creating some UI programmatically which involves some heavy processing. Basically what i want is to run a loader animation while my UI is being built/added to the windo
I don't see any heavy work there, aside from maybe loading images.
Ideally, you should create all of the UI elements (border/grid/etc) on the ui thread, and only do the image loading in another thread.
Or better yet, instead of creating all that UI programmatically, you should be using some form of ItemsControl and DataTemplate to generate all the ui, and load all of your images async in some kind of view model like thing.