Referencing Telerik from Portable Library

6 posts, 1 answers
  1. Eugeniy
    Eugeniy avatar
    60 posts
    Member since:
    Feb 2011

    Posted 12 Apr 2015 Link to this post

    Hello.

    I've created a portable library that targets both windows 8.1 and windows phone 8.1.

    Next, I want to develop some classes that use RadDataboundListBox. Which telerik libraries should I reference to?

    I see three folders at C:\Program Files (x86)\Telerik\UI for Windows Universal Q1 2015\Binaries : Common, Windows 8.1, Windows Phone 8.1.

    I successfully referenced libraries from "Windows 8.1" folder, but, when I use it on "Windows Phone 8.1" project it behaves a little bit different from when I use libraries from "Windows Phone 8.1" folder.

    So again, what is the proper way to reference Telerik from portable library that targets Windows 8.1 and Windows phone 8.1

  2. Answer
    Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 15 Apr 2015 Link to this post

    Hello Eugeniy,

    Thank you for contacting us! Generally, portable libraries are used to share business logic and model across platforms. In Windows Universal you can use this concept again regarding high level abstractions.

    Currently, due to the fact that WP 8.1 and Windows Universal output separate assemblies it is not possible to reference our suit directly in PCL. 

    Depending on the business case I can suggest one of the two options:

     - If you are looking for code sharing you might want to use shared project and add code there
     - If your scenario requires the usage of PCL you might want to wrap RadDataboundListbox in abstraction and use dependency injection to initialize the component runtime depending on the target platform.

    P.S. You can reference all assemblies located in Common subfolder since they are built as PCLs.

    Regards,
    Tsvyatko
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. Eugeniy
    Eugeniy avatar
    60 posts
    Member since:
    Feb 2011

    Posted 15 Apr 2015 in reply to Tsvyatko Link to this post

    Thank you for the reponse, i've got that, but I have some comments:

    As I said, it's possible to reference "telerik windows phone assemblies" from "windows project" and vice versa - i see telerik assemblies are still PCL, so this "it is not possible to reference our suit directly in PCL" is not true.

    Yes, I can use abstraction, but as you see, it's more easier to use built-it controls since they are the same for both types of projects.

  4. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 16 Apr 2015 Link to this post

    Hello Eugeniy,

    You are quite correct! With this in mind we are working in this direction to unify the versions and release one version for binaries making this scenario available out of the box.

    Regards,
    Tsvyatko
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  5. Rod
    Rod avatar
    9 posts
    Member since:
    Jan 2013

    Posted 28 Oct 2015 in reply to Tsvyatko Link to this post

    Any idea of when these unified libraries might be available? I have the same issue where I have a PCL that needs to reference both.

     

    Rod

  6. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 02 Nov 2015 Link to this post

    Hi Rod,

    Recently we have introduced UI for Windows Universal CTP that targets Windows 10. Depending on the target platform you might want to look at it - http://www.telerik.com/universal-windows-platform-ui as it offers unified binaries for all compatible devices (including Desktop and Phone).

    Regards,
    Tsvyatko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top