Exception inside of IMarkupExtension ignored

There is my extension class:

namespace BerilHome
{
    // You exclude the 'Extension' suffix when using in Xaml markup
    [ContentProperty("Text")]
    public class TranslateExtension : IMarkupExtension
    {
        private readonly CultureInfo cultureInfo;
        private const string ResourceId = "TranslateExtension.Properties.Resources";

        private static readonly Lazy<ResourceManager> ResMgr = new Lazy<ResourceManager>(
            () => new ResourceManager(ResourceId, typeof(TranslateExtension).GetTypeInfo().Assembly)
        );

        public TranslateExtension()
        {
            if (Device.OS == TargetPlatform.iOS || Device.OS == TargetPlatform.Android)
            {
                cultureInfo = DependencyService.Get<ISystemInfo>().CultureInfo;
            }
        }

        public string Text { get; set; }

        public object ProvideValue(IServiceProvider serviceProvider)
        {
            throw new NotImplementedException("pow pow");
        }
    }
}

And there is how I trying to use it:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:resx="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:berilHome="clr-namespace:BerilHome;assembly=BerilHome"
             x:Class="BerilHome.Layouts.RemoteObjectsPage"
             Title="{berilHome:Translate RemoteObjectsPage_Title}">
    <!-- berilHome:Translate RemoteObjectsPage_Title} -->
    <ContentPage.Content>
        <StackLayout>
            <Label Text="TEST"></Label>
            <Button Text="Demo" 
                    Clicked="OnButtonClicked" />
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

My app inside of Android emulator just stuck at the white screen without any exception-popup info inside of Visual Studio.
Even more, after a few minutes, my CPU is getting 85 percent loaded by VS.
What's wrong?

Sign In or Register to comment.