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