Beispiel #1
0
        /// <inheritdoc/>
        public ToolBarItemViewModel CreateToolBarItem()
        {
            if (_toolBarComboBoxViewModel == null)
            {
                _toolBarComboBoxViewModel = new ToolBarComboBoxViewModel(this)
                {
                    Width        = 75,
                    Items        = _themeExtension.Themes,
                    SelectedItem = _themeExtension.Theme
                };

                _toolBarComboBoxViewModel.SelectedItemChanged += (s, e) => ChangeTheme((string)_toolBarComboBoxViewModel.SelectedItem);
            }

            return(_toolBarComboBoxViewModel);
        }
Beispiel #2
0
        /// <inheritdoc/>
        public ToolBarItemViewModel CreateToolBarItem()
        {
            if (_toolBarComboBoxViewModel == null)
            {
                _toolBarComboBoxViewModel = new ToolBarComboBoxViewModel(this)
                {
                    Width = 75,
                    Items = _themeExtension.Themes,
                    SelectedItem = _themeExtension.Theme
                };

                _toolBarComboBoxViewModel.SelectedItemChanged += (s, e) => ChangeTheme((string)_toolBarComboBoxViewModel.SelectedItem);
            }

            return _toolBarComboBoxViewModel;
        }