|
void Calendar_OnInlineLoaded(object sender, InlineEventArgs e)
{
Grid grid = new Grid();
grid.BackgroundColor = Color.AliceBlue;
RowDefinition rowDefinition = new RowDefinition();
rowDefinition.Height = GridLength.Star;
RowDefinition rowDefinition1 = new RowDefinition();
rowDefinition.Height = GridLength.Star;
grid.RowDefinitions.Add(rowDefinition);
grid.RowDefinitions.Add(rowDefinition1);
Label label = new Label();
label.HorizontalOptions = LayoutOptions.Center;
label.VerticalOptions = LayoutOptions.Center;
label.HorizontalTextAlignment = TextAlignment.Center;
label.VerticalTextAlignment = TextAlignment.Center;
label.TextColor = Color.Red;
label.Text = "You didn't have any appointments Today";
label.FontSize = 15;
label.FontAttributes = FontAttributes.Italic;
grid.Children.Add(label,0,0);
if(e.appointments.Count==0)
{
e.View = grid;
}
}
|