/// <summary> /// Selects the specified item as the currently selected sub-item /// </summary> /// <param name="item"></param> private void SetSelectedSubItem(RibbonItem item) { if (item == _lastSelectedSubItem) { return; } if (_lastSelectedSubItem != null) { _lastSelectedSubItem.SetSelected(false); RedrawItem(_lastSelectedSubItem, GetContentBounds(_lastSelectedSubItemParent)); } if (item != null) { item.SetSelected(true); RedrawItem(item, GetContentBounds(_lastSelectedSubItemParent)); } _lastSelectedSubItem = item; }
/// <summary> /// Selects the specified item as the currently selected item /// </summary> /// <param name="item"></param> private void SetSelectedItem(RibbonItem item) { if (item == _lastSelectedItem) { return; } if (_lastSelectedItem != null) { _lastSelectedItem.SetSelected(false); RedrawItem(_lastSelectedItem); } if (item != null) { item.SetSelected(true); RedrawItem(item); } _lastSelectedItem = item; }