Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm not able to include a Custom Entry in the axml file of my page. I'm copying and pasting the code of this tutorial.

Custom Controll:

namespace MyApp
{
    public class MyEntry : Entry
    {
        public MyEntry()
        {
            BackgroundColor = Color.Gray;
        }
    }
}

XAML:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:MyApp;assembly=MyApp"
             x:Class="MyApp.Teste">
  <Label Text="teste" VerticalOptions="Center" HorizontalOptions="Center" />

  <local:MyEntry x:Name="Entry" Text="In Shared Code" />
</ContentPage>

App.cs:

 MainPage = new Teste();

I'm getting this error:

56:43.847 E/mono ( 3346): Unhandled Exception: 05-06 17:56:43.847 E/mono ( 3346): System.IO.FileNotFoundException: Could not load file or assembly 'MyApp' or one of its dependencies 05-06 17:56:43.847 E/mono ( 3346): File name: 'MyApp' 05-06 17:56:43.847 E/mono ( 3346): at (wrapper dynamic-method) System.Object:99831900-fb04-4a45-85f3-99b1198ac963 (intptr,intptr,intptr) 05-06 17:56:43.847 E/mono ( 3346): at (wrapper native-to-managed) System.Object:99831900-fb04-4a45-85f3-99b1198ac963 (intptr,intptr,intptr) 05-06 17:56:43.847 E/mono-rt ( 3346): [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'MyApp' or one of its dependencies 05-06 17:56:43.847 E/mono-rt ( 3346): File name: 'MyApp' 05-06 17:56:43.847 E/mono-rt ( 3346): at (wrapper dynamic-method) System.Object:99831900-fb04-4a45-85f3-99b1198ac963 (intptr,intptr,intptr) 05-06 17:56:43.847 E/mono-rt ( 3346): at (wrapper native-to-managed) System.Object:99831900-fb04-4a45-85f3-99b1198ac963 (intptr,intptr,intptr) referenceTable GDEF length=670 1

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
362 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...