Still waiting for a reply on that:http://forums.cshtml5.com/viewtopic.php?f=4&t=8141
My current workaround is to make a Wrapper CSHTML5 app with no dependencies, and just have it display an animated loading animation while it loads the actual CSHTML5 app and then displays it, once loaded. This still shows the default CSHTML5 initial initialization\loading bar, but only for a moment while it loads the new "loading" animation. Then, the inner CSHTML5 project loads hidden, behind my initial loading animation.
This works, more or less, but I don't think is a permanent solution.
It would be great if the CSHTML5 guys could implement the XAML\WPF Progressbar control, use it to replace the default loading bar with a XAML progressbar, and then allowed users to Style the progressbar in the App.xaml file.
Alternately, remember that this loading animation is only displayed while your Application is initializing (loading App.xaml\App.xaml.cs and MainPage.xaml\MainPage.xaml.cs and related references. This means you can speed up the initialization (reducing the time that ugly grey progressbar is visible) by having as FEW references and imported Namespaces as possible in both your App.xaml\App.xaml.cs and MainPage.xaml\MainPage.xaml.cs, and then load your dependencies in child controls\page navigation functions.
Something like this should work:
Code: Select all
Loaded += MainPage_Loaded;
private void MainPage_Loaded(object sender, RoutedEventArgs e)
var ctrlWReferencesAndDependencies = MyFullNameSpace.Factory.CreateControlInstance<MyFullNameSpace.Controls.ControlWithReferencesAndDependencies>();
this.Content = ctrlWReferencesAndDependencies;
The downside to this alternate approach is that Global Styles (like those defined in App.XAML) also take up initialization time, and the more Styles you remove from App.xaml to make initialization faster, the more segmented your code becomes with Styles defined elsewhere throughout your application, rather in the App ResourceDictionary. You may just want to make a separate CSHML5 assembly just for your Styles and other App Resources, and then reference that assembly inside of the controls which use them, instead of putting them all in App.xaml.