/// <summary> /// Gets the selection color if the item is selected, or the specified color if it is not. /// </summary> /// <param name="originalColor">The unselected color of the element.</param> /// <param name="index">The index of the item to check (use -1 for all items).</param> /// <returns>A color.</returns> protected OxyColor GetSelectableColor(OxyColor originalColor, int index = -1) { // TODO: rename to GetActualColor (33 usages) if (originalColor.IsUndefined()) { return OxyColors.Undefined; } if (this.IsItemSelected(index)) { return this.ActualSelectedColor; } return originalColor; }