Forum Visual Studio

Exception inside of IMarkupExtension ignored

There is my extension class:

namespace BerilHome
    // You exclude the 'Extension' suffix when using in Xaml markup
    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=""
             Title="{berilHome:Translate RemoteObjectsPage_Title}">
    <!-- berilHome:Translate RemoteObjectsPage_Title} -->
            <Label Text="TEST"></Label>
            <Button Text="Demo" 
                    Clicked="OnButtonClicked" />

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.