Skip to content

Ambiguous Match Exception #13

@LukeTim

Description

@LukeTim

I have installed the NuGet package and added the CardStackView to the default Xamarin.Forms App template under ItemsPage.xaml with the following piece of XAML

<swipecards:CardStackView
                x:Name="CardStackView"
                ItemsSource="{Binding Items}">
                <swipecards:CardStackView.ItemTemplate>
                    <DataTemplate>
                        <StackLayout Padding="10">
                            <Label Text="{Binding Text}" LineBreakMode="NoWrap" Style="{DynamicResource ListItemTextStyle}" FontSize="16" />
                            <Label Text="{Binding Description}" LineBreakMode="NoWrap" Style="{DynamicResource ListItemDetailTextStyle}" FontSize="13" />
                        </StackLayout>
                    </DataTemplate>
                </swipecards:CardStackView.ItemTemplate>
            </swipecards:CardStackView>

When I run the app, however, I get an Ambiguous Match Exception in the generated code ItemsPage.xaml.g.cs on the following line:

CardStackView = global::Xamarin.Forms.NameScopeExtensions.FindByName<global::SwipeCards.Controls.CardStackView>(this, "CardStackView");

I'm really unsure how to go about debugging this. Is it something I'm doing wrong? It seems, from the exception name, like the code is confused about which of two different objects it should be accessing...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions