Problem with loading PCL in XAML

Good afternoon,

I am working through Xamarin.Forms examples in the Petzold book (Preview 2), and having trouble loading an external PCL. I have created a PCL library with one class in it. I am able to set a reference to this PCL in Xamarin Studio, and I can use the class in code just fine. When I try to instantiate and use it in XAML (I have included the namespace/assembly in my XAML header, I get a file not found error when it's trying to load from XAML. I have verified that the dll in question resides in by bin folder, but both my iOS and Android simulators are unable to find the dll to load. Any advice would be helpful.

I am running Xamarin Studio on a Mac. Here's the XAML:

<?xml version="1.0" encoding="UTF-8"?>

<ContentPage.Padding> 
    <OnPlatform x:TypeArguments="Thickness" 
        iOS="10, 20, 10, 0" 
        Android="10, 0" 
        WinPhone="10, 0" /> 
</ContentPage.Padding> 

<ListView ItemsSource="{x:Static toolkit:NamedColor.All}"> 
    <ListView.ItemTemplate> 
        <DataTemplate> 
            <TextCell 
                Text="{Binding FriendlyName}" 
                Detail="{Binding RgbDisplay, StringFormat='RGB = {0}'}" /> 
        </DataTemplate> 
    </ListView.ItemTemplate> 
</ListView>

As I said, the dll (WikiPEETia.toolkit.dll) is in the bin directory (TextCellListXaml/bin/Debug). What am I missing?

Thank you,

Chris Peet
[email protected]

Sign In or Register to comment.