public VotingButton(TeamColor teamColor) { switch (teamColor) { case TeamColor.Red: BackgroundColor = Color.Red; break; case TeamColor.Green: BackgroundColor = Color.Green; break; default: throw new NotSupportedException($"{teamColor.GetType()} Not Supported"); } Text = "Vote"; CornerRadius = 10; TextColor = Color.White; CommandParameter = teamColor; }