Xmarin.Forms.Xaml.XamlParseException找不到方法

时间:2017-02-16 13:52:19

标签: c# visual-studio xamarin xamarin.android

这是我的代码

<?xml version="1.0" encoding="utf-8" ?> 
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" 
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
             x:Class="App3.Page2" 
             Title="Welcome to the second page!!!"> 
    <ContentPage.Content> 
        <ScrollView> 
            <StackLayout> 
                <Grid> 
                    <Grid.RowDefinitions> 
                        <RowDefinition Height="3*"/> 
                        <RowDefinition Height="3*"/> 
                        <RowDefinition Height="*"/> 
                    </Grid.RowDefinitions> 
                    <Editor x:Name="fstN" 
                            Text="Enter 1st number" 
                            Grid.Row="0" 
                            Grid.Column="0" 
                            Grid.ColumnSpan="2" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            TextChanged="fstNTextChanged"/> 
                    <Editor x:Name="scndN" 
                            Text="Enter 2nd number" 
                            Grid.Row="0" 
                            Grid.Column="2" 
                            Grid.ColumnSpan="2" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            TextChanged="scndNTextChanged"/> 
                    <Button x:Name="plusButton" 
                            Text="+" 
                            Grid.Row="1" 
                            Grid.Column="0" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            Clicked="plusButtonCicked"/> 
                    <Button Text="-" 
                            Grid.Row="1" 
                            Grid.Column="1" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            /><!--Clicked="minusBtnCicked"/>--> 
                    <Button Text="/" 
                            Grid.Row="1" 
                            Grid.Column="2" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            /><!--Clicked="ratioBtnCicked"/>--> 
                    <Button Text="*" 
                            Grid.Row="1" 
                            Grid.Column="3" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill" 
                            /><!--Clicked="productionBtnCicked"/>--> 
                    <Label x:Name="lblAns" 
                            Text="Answer" 
                            Grid.Row="2" 
                            Grid.ColumnSpan="4" 
                            HorizontalOptions="Fill" 
                            VerticalOptions="Fill"/> 
                </Grid> 
            </StackLayout> 
        </ScrollView> 
    </ContentPage.Content> 
</ContentPage>

我评论了所有按钮的点击事件,除了一个只是为了显示 并且有一个错误,听起来像&#34; Xamarin.Forms.Xaml.XamlParseException:在类型App3.Page2&#34;上找不到方法plusButtonClicked。 关于这是什么的任何想法?

0 个答案:

没有答案