/// <summary> /// Creates a new instance of the <see cref="MainViewModel"/> class. /// </summary> public MainViewModel() { // Gets the model instance from the App object. model = (App.Current as App)?.Model; if (model == null) { throw new Exception($"Failed to get reference of model instance on the {GetType().ToString()} class."); } }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { InitializeComponent(); Suspending += OnSuspending; Model = new IconFontCollectionModel(); #if DEBUG // Change UI language for Debugging with additional languages. //System.Globalization.CultureInfo.CurrentUICulture = new System.Globalization.CultureInfo( "en-US" ); #endif }