My theme selector is on my main page, so I get a reference to this and wire up the SelectionChanged event within my usercontrol [this contains some gauges]. I then try to set the theme, however it crashes out with a major error and the browser shuts down?
this.Loaded += new RoutedEventHandler(GaugeItemControl_Loaded);
BusyIndicator bi = Application.Current.RootVisual as BusyIndicator;
MainPage mp = bi.Content as MainPage;
mp.themeSelector.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(themeSelector_SelectionChanged);
void themeSelector_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
var o = this.ChildrenOfType<
foreach(var i in o)
StyleManager.SetTheme(i, new Windows7Theme());
Is there some way to bind the theme to the grid [that the gauges are in] then just change the theme on the grid?