Customize No Appointments message

Hello,

Is it possible to customize the view presented when there are no appointments for the day?
How do I achieve that? 

Thank you.

1 Reply

VR Vigneshkumar Ramasamy Syncfusion Team October 8, 2018 12:11 PM UTC

Hi Rafael Pereira 
 
Thanks for contacting Syncfusion support. 
 
We have analyzed you query with “Customizing no appointments inline view” and it can be achievied by setting custom view in OnInlineLoaded event. Please find the below code snippet for the same. 
 
 
   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; 
            } 
        } 
 
 
 
Please find the sample from the below link. 
 
Sample Link: NoAppointment
 
 
Currently it will work only on iOS platform. In android and UWP we are facing issue while setting custom view. We have logged issue report for the same and We will fix the issue and included in our upcoming 2018 Volume 3 Service Pack 1 release which is scheduled to be rolled out by the end of October. We appreciate your patience until then. 
 
Regards 
Vigneshkumar R 


Loader.
Up arrow icon