private void ConfigControlBar() { ApplyButton.Visibility = RevertButton.Visibility = (DrawModel.HasApplyRevert) ? Visibility.Visible : Visibility.Collapsed; UndoButton.Visibility = RedoButton.Visibility = UndoCount.Visibility = RedoCount.Visibility = (DrawModel.HasUndoRedo) ? Visibility.Visible : Visibility.Collapsed; OverviewOnOffBorder.Visibility = (DrawModel.Picker1Data is IDrawData) ? Visibility.Collapsed : Visibility.Visible; var idKeys = DrawModel.GetModeIdKeys(); for (byte modeIndex = 0; modeIndex < idKeys.Count; modeIndex++) { var key = idKeys[modeIndex]; var accKey = Root.GetAcceleratorId(key); var name = Root.GetNameId(key); var summary = Root.GetSummaryId(key); var itm = new ComboBoxItem(); itm.Content = TrySetKeyboardAccelerator(modeIndex, accKey) ? $"{accKey} = {name}" : $"{name}"; ModeComboBox.Items.Add(itm); ToolTipService.SetToolTip(itm, summary); } }