SfCalendar HeaderView UWP HRESULT E_FAIL Error

I am using the SfCalendar control.Syncfusion version 19.0.1.54.It throws an error when I use headerview.It works flawlessly on iOS and Android, throwing error in UWP. Details of the error:

"System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.\r\n at Windows.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)\r\n at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.MeasureOverride(Size availableSize)\r\n at Windows.UI.Xaml.UIElement.Measure(Size availableSize)\r\n at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.MeasureOverride(Size availableSize)\r\n at Windows.UI.Xaml.UIElement.Measure(Size availableSize)\r\n at Xamarin.F"



4 Replies 1 reply marked as answer

MS Muniappan Subramanian Syncfusion Team April 1, 2021 11:30 AM UTC

Hi Measut,  
 
Thank you for contacting Syncfusion support.  
 
We have checked the reported issue “SfCalendar HeaderView UWP HRESULT E_FAIL Error“and it’s working fine from our end. We have checked in the scenario by setting custom header using “HeaderView” property of SfCalendar. We have attached the tested sample in the following link,  
 
 
Additional information:  
 
Tested device: Lenovo windows machine 
SfSchedule version: 19.1.0.54 
Xamarin Forms: 4.5.0.617 
 
Could you please check our sample and let us know if you still facing the same issue? If not, please modify our sample to reproduce the issue which will be helpful for us to check on it and provide you the solution as soon as possible.  
 
Regards,  
Muniappan S 


Marked as answer

MS Mesut Solak April 1, 2021 12:03 PM UTC

Hi Muniappan S,

XAML : 

  <sfcal:SfCalendar.Behaviors>
           <behaviors:SfCalendarHeaderBehavior />
    </sfcal:SfCalendar.Behaviors>

Behaviors :

  public class SfCalendarHeaderBehavior : Behavior<SfCalendar>
    {
        protected override void OnAttachedTo(BindableObject bindable)
        {
            (bindable as SfCalendar).HeaderView = new Label
            {
                Text = "Deneme Header"
            };
        }
    }

The same error continues.I would like to point out that xamarin.forms 5.0.0.12


MS Mesut Solak April 1, 2021 01:26 PM UTC

Hi Muniappan S,

I found the error. When we try to open the calendar in the navigation page or popup page (Rg.Popup), it throws an error. The problem disappears when we do Navigation.PushAsync normally.
It should be checked by looking at other page filling events. (NavigationPage, Page, PopupPage).

No Problem :

 await Navigation.PushAsync(calendarPopupView);

There is a problem :

 await RootPage.Detail.Navigation.PushPopupAsync(calendarPopup);


SS SaiGanesh Sakthivel Syncfusion Team April 4, 2021 04:48 PM UTC

Hi Measut,

Thank you the update.

#Regarding SfCalendar HeaderView UWP HRESULT E_FAIL Error
we regret to inform you that We have check the given sample and we could not replicate the reported scenario from our side. we have tested the sample with x86 processor and Target version 1809(10.0;Build 17763). Please refer to the tested sample in the following link for your reference.
 
 
 
Please check the sample and let us know if you still facing the same issue? If not, could you please modify our sample to reproduce the issue which would be helpful for us to check on it and provide you the solution at the earliest.     
   
Regards,    
SaiGanesh Sakthivel  


Loader.
Up arrow icon