|145787||Jul 8,2019 06:53 PM UTC||Jul 11,2019 07:18 AM UTC||Xamarin.Forms||5|
private void Button_Clicked(object sender, EventArgs e)
var button = sender as Button;
//Storing selected appointment view to clear selection on next selection
//Clears existing selected cell
schedule.SelectedDate = null;
//Clears existing selected appointment
//Change Background color of selected appointment
var parentView = button.Parent as Grid;
if (parentView.BackgroundColor == Color.YellowGreen)
parentView.BackgroundColor = Color.Black;
parentView.BackgroundColor = Color.YellowGreen;
private void ClearSelection()
var previousSelectedView = customViews.FirstOrDefault(x => (x.Parent as Grid).BackgroundColor == Color.Black);
if(previousSelectedView != null)
(previousSelectedView.Parent as Grid).BackgroundColor = Color.YellowGreen;
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.