Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

Namespace Xamarin.Forms.Core not found

$
0
0

Hi,

I'm just starting with Xamarin.Forms. I now ran into a problem when trying to write a XAML markup extension as described in Petzolds book to access embeded images.

using System;

using Xamarin.Forms;
using Xamarin.Forms.Core;

namespace EmbeddedResources
{

    [ContentProperty("Source")]
    public class ImageResourceExtension : IMarkupExtension
    {
        public string Source { get; set; }
        public object ProvideValue(IServiceProvider serviceProvider)
        {
            if (Source == null)
                return null;
            return ImageSource.FromResource(Source);
        }
    }
}

But I get the message Type or Namespace Core is not included in Xamatin.Forms. But As shown in the project explorer it's there as you can see on the screenshot.

All the best
Thomas


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>