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

SfPopupLayout.IsOpenProperty crashes when set to true

Thread ID:

Created:

Updated:

Platform:

Replies:

140846 Nov 10,2018 06:19 PM UTC May 6,2019 10:30 AM UTC Xamarin.Forms 5
loading
Tags: SfPopup
Jean Hardy
Asked On November 10, 2018 06:19 PM UTC

Hello,
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?
Regards

Vigneshkumar Ramasamy [Syncfusion]
Replied On 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.  
  
  
   
Regards,  
Vigneshkumar R  


Dave Friedel
Replied On 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.


    <ContentPage.Content>
        <popuplayout:SfPopupLayout x:Name="popup">
            <popuplayout:SfPopupLayout.Content>
                <Grid Padding="0" Margin="0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <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>
                            <x:String>Warnings</x:String>
                            <x:String>Errors</x:String>
                        </ListCollection:List>
                    </segmentedcontrol:SfSegmentedControl>
                    <pulltorefresh:SfPullToRefresh
                                x:Name="pullToRefresh"
                                IsRefreshing="False" 
                                Grid.Row="1"
                                PullingThreshold="100"
                                TransitionMode="Push"
                                RefreshContentHeight="30"
                                RefreshContentThreshold="30"
                                RefreshContentWidth="30">
                        <pulltorefresh:SfPullToRefresh.PullableContent>
                            <listview:SfListView x:Name="listView" AllowSwiping="False" ItemDoubleTapped="ListView_ItemDoubleTapped" AutoFitMode="Height" ItemSpacing="5,0,0,0" SwipeEnded="ListView_SwipeEnded" ItemsSource="{Binding AppLogs}">
                                <listview:SfListView.ItemTemplate>
                                    <DataTemplate>
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto"/>
                                                <RowDefinition Height="*"/>
                                                <RowDefinition Height="1"/>
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="Auto"/>
                                            </Grid.ColumnDefinitions>
                                            <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"/>
                                        </Grid>
                                    </DataTemplate>
                                </listview:SfListView.ItemTemplate>
                                <listview:SfListView.RightSwipeTemplate>
                                    <DataTemplate x:Name="LeftSwipeTemplate">
                                        <Grid>
                                            <Grid BackgroundColor="White" HorizontalOptions="Fill" VerticalOptions="Fill" Grid.Column="0">
                                                <Grid VerticalOptions="Center" HorizontalOptions="Center">
                                                    <Image Grid.Column="0"
                                                        Grid.Row="0"
                                                        BackgroundColor="Transparent"
                                                        HeightRequest="35"
                                                        WidthRequest="35"
                                                        Source="ic_apps.png" />
                                                </Grid>
                                            </Grid>
                                        </Grid>
                                    </DataTemplate>
                                </listview:SfListView.RightSwipeTemplate>
                            </listview:SfListView>
                        </pulltorefresh:SfPullToRefresh.PullableContent>
                    </pulltorefresh:SfPullToRefresh>
                </Grid>
            </popuplayout:SfPopupLayout.Content>
            <popuplayout:SfPopupLayout.PopupView>
                <popuplayout:PopupView HeaderTitle="{Binding LastLogTime}"
                           ShowFooter="False">
                    <popuplayout:PopupView.ContentTemplate>
                        <DataTemplate>
                            <ScrollView HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                                <Label Text="{Binding LastLogStackTrace}"
                                    BackgroundColor="White"
                                    HorizontalOptions="FillAndExpand"
                                    />
                            </ScrollView>
                        </DataTemplate>
                    </popuplayout:PopupView.ContentTemplate>
                </popuplayout:PopupView>
            </popuplayout:SfPopupLayout.PopupView>
        </popuplayout:SfPopupLayout>
    </ContentPage.Content>

Subburaj Pandian Veluchamy [Syncfusion]
Replied On 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? 
 
Regards,
Subburaj Pandian V   


Dave Friedel
Replied On 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."

D.

Subburaj Pandian Veluchamy [Syncfusion]
Replied On 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.  
 
Regards,
Subburaj Pandian V   


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

;