We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Null reference exception with tabview inside popup content

Thread ID:

Created:

Updated:

Platform:

Replies:

141223 Nov 30,2018 05:30 AM UTC Dec 4,2018 11:55 AM UTC Xamarin.Forms 1
loading
Tags: SfTabView
FrozDark
Asked On November 30, 2018 05:30 AM UTC

When I try to show the following it throws an exception. It happens when I put content inside any of the tab item If I remove content from tab items, no exception happens

                            <sfpopup:SfPopupLayout x:Name="popupLayout">
                                <sfpopup:SfPopupLayout.PopupView>
                                    <sfpopup:PopupView x:Name="popupView"
                                                       BindingContext="{x:Null}"
                                                       ShowHeader="False" 
                                                       ShowFooter="False"
                                                       WidthRequest="400"
                                                       HeightRequest="600"
                                                       AnimationMode="Fade">
                                        <sfpopup:PopupView.ContentTemplate>
                                            <DataTemplate>
                                                <sftabview:SfTabView BackgroundColor="White">
                                                    <sftabview:SfTabView.Items>
                                                        <sftabview:SfTabItem Title="Item 1">
                                                            <sftabview:SfTabItem.Content> // With the content inside a tab item throws an exception
                                                                <Label Text="Hello"/>
                                                            </sftabview:SfTabItem.Content>
                                                        </sftabview:SfTabItem>
                                                        <sftabview:SfTabItem Title="Item 2">
                                                        </sftabview:SfTabItem>
                                                        <sftabview:SfTabItem Title="Item 3">
                                                        </sftabview:SfTabItem>
                                                    </sftabview:SfTabView.Items>
                                                </sftabview:SfTabView>
                                            </DataTemplate>
                                        </sfpopup:PopupView.ContentTemplate>
                                    </sfpopup:PopupView>
                                </sfpopup:SfPopupLayout.PopupView>


                                <sfpopup:SfPopupLayout.Content>
                                    <Label Text="Some content"/>
                                </sfpopup:SfPopupLayout.Content>
                            </sfpopup:SfPopupLayout>


Exception message
---------------------------------
System.NullReferenceException: Object reference not set to an instance of an object.
   at Syncfusion.XForms.UWP.TabView.SfTabViewItem.OnApplyTemplate()
   at Windows.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)
   at Windows.UI.Xaml.UIElement.Measure(Size availableSize)
   at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.MeasureOverride(Size availableSize)
   at Windows.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)
   at Syncfusion.XForms.UWP.PopupLayout.PopupView.MeasureOverride(Size availableSize)
   at Windows.UI.Xaml.UIElement.Measure(Size availableSize)
   at Syncfusion.XForms.UWP.PopupLayout.VisualContainer.MeasureOverride(Size availableSize)
   at Windows.UI.Xaml.UIElement.Arrange(Rect finalRect)
   at Syncfusion.XForms.UWP.PopupLayout.PopupView.UpdatePopupView()
   at Syncfusion.XForms.UWP.PopupLayout.SfPopupLayout.DisplayPopup()
   at Syncfusion.XForms.UWP.PopupLayout.SfPopupLayout.set_IsOpen(Boolean value)
   at Syncfusion.XForms.UWP.PopupLayout.RendererHelper.MapSfPopupLayoutProperties(String propertyName, SfPopupLayout formsPopupLayout, SfPopupLayout nativePopupLayout)
   at Syncfusion.XForms.UWP.PopupLayout.SfPopupRenderer.OnElementPropertyChanged(Object sender, PropertyChangedEventArgs e)
   at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
   at Xamarin.Forms.BindableObject.OnPropertyChanged(String propertyName)
   at Xamarin.Forms.Element.OnPropertyChanged(String propertyName)
   at Xamarin.Forms.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent)
   at Xamarin.Forms.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes)
   at Xamarin.Forms.BindableObject.SetValue(BindableProperty property, Object value, Boolean fromStyle, Boolean checkAccess)
   at Syncfusion.XForms.UWP.PopupLayout.SfPopupLayout.OpenOrClosePopup(Boolean open)
   at Syncfusion.XForms.UWP.PopupLayout.SfPopupLayout.Show()
   at Syncfusion.XForms.UWP.PopupLayout.PopupLayoutDependencyService.Show(Object nativeObject, SfPopupLayout formsPopup)
   at Syncfusion.XForms.PopupLayout.SfPopupLayout.Show()
---------------------------------

Paul Anderson S [Syncfusion]
Replied On December 4, 2018 11:55 AM UTC

Hi, 
 
Greetings from Syncfusion. 
 
We checked the reported issue “Null reference exception occurs in tabview which is placed inside popup view” with the given code snippet and we are able to reproduce the reported issue in the 16.3.0.29 version. The reported issue has been fixed in the latest version (16.3.0.36), so please upgrade the SfTabView version to the latest version to resolve the reported issue. 
 
Regards, 
Paul Anderson 


CONFIRMATION

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;