private void OnMouseDown() { if (commandBar.CanSelectButton) { selected = !selected; UpdateSelection(); commandBar.SelectButton(selected ? this : null); } }