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. Image for the cookie policy date

SfPopupLayout.IsOpenProperty crashes when set to true

I try with success to create a SfPopUp in code behind and bind the different values from my Prism ViewModel.
The only thing I cannot bind is "IsOpenProperty". Every time I switch the value to true in my viewmodel, the app crashes and return:
Exception = {System.NullReferenceException: Object reference not set to an instance of an object.}
Here is my code line:
popupLayout.SetBinding(SfPopupLayout.IsOpenProperty, new Binding("IsPopUpOpen", mode:BindingMode.TwoWay));
In my xaml.cs code calling SfPopupLayout.Show() works fine.

I don't understand this issue. Can you please help?

5 Replies

VR Vigneshkumar Ramasamy Syncfusion Team November 12, 2018 07:31 AM UTC

Hi Jean Hardy,  
Thanks for using Syncfusion products.  
We have checked your query.  We have prepared the sample based on your requirement to reproduce the reported issue. But the issue does not reproduced from our side. we have attached the sample for your reference. You can download the same from the below link. Also refer the below UG link.  
Vigneshkumar R  

DF Dave Friedel May 2, 2019 05:37 AM UTC

This is happening to me as well - I do have mine inside a navigationpage which I pushed my contentpage on to.  Here is my page.

        <popuplayout:SfPopupLayout x:Name="popup">
                <Grid Padding="0" Margin="0">
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    <segmentedcontrol:SfSegmentedControl x:Name="segmentedControl" Margin="10,10,10,10" SelectionChanged="SfSegmentedControl_SelectionChanged" SelectionTextColor="Gray" >
                        <ListCollection:List x:TypeArguments="x:String">
                            <x:String>All Logs</x:String>
                            <listview:SfListView x:Name="listView" AllowSwiping="False" ItemDoubleTapped="ListView_ItemDoubleTapped" AutoFitMode="Height" ItemSpacing="5,0,0,0" SwipeEnded="ListView_SwipeEnded" ItemsSource="{Binding AppLogs}">
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition Height="*"/>
                                                <RowDefinition Height="1"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="Auto"/>
                                            <Label Text="{Binding Date}" FontAttributes="Bold" />
                                            <Label Grid.Column="1" FontAttributes="Bold" Text="{Binding LogType}" />
                                            <Label Grid.Row="1" Grid.ColumnSpan="2" Text="{Binding LogBody}" />
                                            <BoxView BackgroundColor="LightGray" Grid.Row="2" Grid.ColumnSpan="2" HeightRequest="1"/>
                                    <DataTemplate x:Name="LeftSwipeTemplate">
                                            <Grid BackgroundColor="White" HorizontalOptions="Fill" VerticalOptions="Fill" Grid.Column="0">
                                                <Grid VerticalOptions="Center" HorizontalOptions="Center">
                                                    <Image Grid.Column="0"
                                                        Source="ic_apps.png" />
                <popuplayout:PopupView HeaderTitle="{Binding LastLogTime}"
                            <ScrollView HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                                <Label Text="{Binding LastLogStackTrace}"

SP Subburaj Pandian Veluchamy Syncfusion Team May 2, 2019 11:38 AM UTC

Hi Dave, 
Thank you for contacting Syncfusion support. 
Based on the provided information, we have checked and we can able to replicate the issue “Throws exception while setting ScrollView as PopupView’s ContentTemplate in Xamarin.Forms UWP”. This issue occurs at Xamarin framework level and not because of SfPopupLayout. We already reported issue to GitHub and having follow-up with the same. Please follow-up with the following issue report for further updates, we will let you know once we got solution from Xamarin team.  
Can you please share the stack trace and confirm us you’re also mentioning the same issue? 
Subburaj Pandian V   

DF Dave Friedel May 3, 2019 06:44 PM UTC

I will watch it although it is Xamarin.Forms and Android for me but I am getting "Object reference not set to an instance of an object."


SP Subburaj Pandian Veluchamy Syncfusion Team May 6, 2019 10:30 AM UTC

Hi Dave, 
Thank you for the update.

We have checked the issue with the mentioned scenario in Xamarin.Forms Android and it is works fine from our end. We have prepared sample based on your code and unable to replicate the issue when showing Popup layout.

Please find the sample for your reference,

Sample link: PopupTestSample
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us with the more details along with your Syncfusion and Xamarin.Forms update version. It will be helpful for us to check on it and provide you the solution at the earliest.  
Subburaj Pandian V   

Live Chat Icon For mobile
Up arrow icon