locked
Xamarin Components and Xamarin.Forms RRS feed

  • Question

  • User15654 posted

    Can Xamarin Components be used in a Xamarin.Form / Portable Class Library? For example, can I use Alert Center on the iOS & Android project and somehow reach back to those from the PCL and display the alert?

    Regards, Brian Williams

    Saturday, July 5, 2014 1:01 AM

Answers

  • User2496 posted

    Hi, you can't add it to the pcl project, for now you have to create a way to abstract it on your xamarin forms project, using dependency service or a custom renderer.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Saturday, July 5, 2014 1:33 AM

All replies

  • User2496 posted

    Hi, you can't add it to the pcl project, for now you have to create a way to abstract it on your xamarin forms project, using dependency service or a custom renderer.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Saturday, July 5, 2014 1:33 AM
  • User15654 posted

    That sounds really good, but I have no idea how to do that. Do you know any example projects, video demos, or links explaining how?

    Thanks you... -Brian

    Saturday, July 5, 2014 4:45 AM
  • User15654 posted

    I found the sample code, hooked up the Text to speech then did the same for Alert Center. Worked like a charm. http://developer.xamarin.com/guides/cross-platform/xamarin-forms/dependency-service/

    Thanks for the help Rui.

    Saturday, July 5, 2014 5:35 PM