예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ThemeOptionsPageViewModel"/> class.
        /// </summary>
        /// <param name="themeExtension">The themes extension.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="themeExtension"/> is <see langword="null"/>.
        /// </exception>
        public ThemeOptionsPageViewModel(ThemeExtension themeExtension)
            : base("Themes")
        {
            if (themeExtension == null)
            {
                throw new ArgumentNullException(nameof(themeExtension));
            }

            _themeExtension = themeExtension;
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ThemeCommandItem"/> class.
        /// </summary>
        /// <param name="themeExtension">The theme extension.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="themeExtension"/> is <see langword="null"/>.
        /// </exception>
        public ThemeCommandItem(ThemeExtension themeExtension)
        {
            if (themeExtension == null)
            {
                throw new ArgumentNullException(nameof(themeExtension));
            }

            _themeExtension = themeExtension;
            _themeExtension.ThemeChanged += OnThemeChanged;
        }