public BussinessApplication() { Current = this; Background = Brushes.White; Buttons = new ObservableCollection<Button>(); if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml") == 0) Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml") }); if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml") == 0) Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml") }); if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml") == 0) Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml") }); if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml") == 0) Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml") }); if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml") == 0) Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml") }); if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml") == 0) Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml") }); }
public BussinessApplication() { Current = this; Background = Brushes.White; Buttons = new ObservableCollection <Button>(); if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml") == 0) { Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml") }); } if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml") == 0) { Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml") }); } if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml") == 0) { Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml") }); } if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml") == 0) { Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml") }); } if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml") == 0) { Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml") }); } if (Application.Current.Resources.MergedDictionaries.Count(t => t.Source.OriginalString == "pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml") == 0) { Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml") }); } }