Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Assertion error for ViewCell.Tapped

$
0
0

I'm getting a weird error for what feel like should be something straightforward. I have a ListView with a DataTemplate shown below. For some reason when I run this, and tap on a cell, it closes immediately with

Assertion at [Long Path]/xamarin-android/external/mono/mono/metadata/marshal.c:7928, condition `mono_method_signature (method)->pinvoke' not met

in the Output.
The XAML in question:

            <ListView.ItemTemplate>
                <DataTemplate>
                    <ViewCell x:Name="_vcellBlock"
                              Tapped="_vcellBlock_Clicked">
                        <StackLayout x:Name="_stkCellBlock"
                                     Orientation="Horizontal">

                            <StackLayout Orientation="Vertical"
                                         HorizontalOptions="StartAndExpand">
                                <Label Text="{Binding Name}"
                                       FontSize="Medium"/>
                                <Label Text="{Binding Description}"/>
                            </StackLayout>

                            <Frame
                                WidthRequest="75"
                                Padding="0"
                                HorizontalOptions="End">
                                <Label x:Name="_lblListQty"
                                       Text="{Binding QuantityToString}"
                                       HorizontalOptions="Center"
                                       VerticalOptions="Center"
                                       FontSize="Large"
                                   />
                            </Frame>

                        </StackLayout>
                    </ViewCell>
                </DataTemplate>
            </ListView.ItemTemplate>

_vcellBlock_Clicked is defined, but it doesn't seem to matter since break points put on the function are never hit. The assertion is killing it before the event handler ever gets called.

Edit: Other event handlers works fine (like those in the toolbar).


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>