locked
XAML Previewer - Are custom controls supported? RRS feed

  • Question

  • User34653 posted

    Are custom controls supported in the previewer? I keep getting an error Type c:ExtendedLabel not found

    I have attached an example app.

    Tuesday, December 6, 2016 3:04 AM

Answers

  • User34653 posted

    So I figured this one out. You need = instead of : when specifying the assembly

    xmlns:c="clr-namespace:App13.Controls;assembly:App13"

    xmlns:c="clr-namespace:App13.Controls;assembly=App13"

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, December 6, 2016 10:28 PM

All replies

  • User268349 posted

    Yes, Previewer supports custom control. I download your project and it works (only in iOs mode, Android preview doesn't work for me at all)

    Tuesday, December 6, 2016 7:04 AM
  • User34653 posted

    Which version of Xamarin are you using?

    I am using the following, which is the latest Beta version. I have also tried with the latest stable version.

    Microsoft Visual Studio Professional 2015 Version 14.0.25431.01 Update 3

    Xamarin 4.2.1.60 (47830f6) Xamarin.Android 7.0.2.37 (ce955cc) Xamarin.iOS 10.2.1.5 (44931ae)

    Tuesday, December 6, 2016 7:33 AM
  • User268349 posted

    I'm using Xamarin alfa channel Xamarin 4.3.0.458 Xamarin.Android 7.1.0.13 Xamarin.iOs 10.4.0.33

    VS 2015 community upd3

    Tuesday, December 6, 2016 7:56 AM
  • User34653 posted

    So I figured this one out. You need = instead of : when specifying the assembly

    xmlns:c="clr-namespace:App13.Controls;assembly:App13"

    xmlns:c="clr-namespace:App13.Controls;assembly=App13"

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, December 6, 2016 10:28 PM
  • User225049 posted

    How did you solved it? I'm trying to use Iconize (from nuget packages https://www.nuget.org/packages/Xam.Plugin.Iconize/2.0.0.24-beta) and get this message while rendering;

    Type Iconize:IconImage not found in xmlns clr-namespace:FormsPlugin.Iconize

    my definition of namespace is like this: < ContentPage x:Class="Login.Views.LoginPage" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:Iconize="clr-namespace:FormsPlugin.Iconize;assembly=FormsPlugin.Iconize" > < / ContentPage>

    Do you know if I'm missing something?

    Friday, June 16, 2017 11:56 PM