/// <summary> /// Initializes a new instance of the <see cref="ConfigurableWindow"/> class. /// </summary> /// <exception cref="System.ArgumentNullException">_settings - Cannot be null.</exception> protected ConfigurableWindow() { _settings = CreateSettings(); if (_settings == null) { throw new ArgumentNullException(nameof(_settings), $"{nameof(_settings)} {Localization.Properties.Resources.IsRequired}"); } Loaded += delegate { _isLoaded = true; }; ApplySettings(); }
/// <summary> /// Initializes a new instance of the <see cref="ConfigurableWindow"/> class. /// </summary> /// <exception cref="System.ArgumentNullException">_settings - Cannot be null.</exception> protected ConfigurableWindow() { _settings = CreateSettings(); if (_settings == null) { throw new ArgumentNullException(nameof(_settings), "Cannot be null."); } Loaded += delegate { _isLoaded = true; }; ApplySettings(); }
/// <summary> /// Derived classes must return the object which exposes /// persisted window settings. This method is only invoked /// once per Window, during construction. /// </summary> /// <returns></returns> protected override IConfigurableWindowSettings CreateSettings() { return(_settings = _settings ?? new ShellSettings(this)); }