protected override void Initialize() { base.Initialize(); var commandService = GetService(typeof(IMenuCommandService)) as OleMenuCommandService; commandService.AddCommand(_addNewSubCollectionCommand); commandService.AddCommand(_addNewStringValueCommand); commandService.AddCommand(_addNewDWORDValueCommand); commandService.AddCommand(_addNewQWORDValueCommand); commandService.AddCommand(_addNewBinaryValueCommand); commandService.AddCommand(_renameCommand); commandService.AddCommand(_deleteCommand); commandService.AddCommand(_modifyCommand); commandService.AddCommand(_refreshCommand); commandService.AddCommand(_copyKeyNameCommand); commandService.AddCommand(_copyPropertyNameCommand); commandService.AddCommand(_copyPropertyValueCommand); Content = _control = new SettingsStoreExplorerToolWindowControl(this); _control.treeView.SelectedItemChanged += TreeView_SelectedItemChanged; _control.listView.SelectionChanged += ListView_SelectionChanged; KnownUIContexts.ShellInitializedContext.WhenActivated(InitializeViewModel); }