Forum Xamarin.Forms

Just few ideas for Xamarin.Forms user experience improvement

ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭
  1. Should create projects for all the 3 OSs when we create a XF solution in XS in Mac. The non-functional ones may be grayed.
  2. Should handle line endings automatically between Unix and Windows policies.
  3. If possible, should be able to reference non-PCL projects in a PCL project.


  • rmevans9rmevans9 USMember
    edited June 2014

    Can't speak to the first two but I doubt #3 is possible. Having a PCL set to certain platforms means you only have access to base objects/methods that work across all platforms that yiu have select. Further more any project that references that PCL basically has a dependency on anything the PCL depends on... even if you don't reference it directly. What this means is if you try and reference a iOS project from the PCL then everything referencing that PCL needs to support that iOS project that the PCL depends on. This basically renders your PCL uesless.

  • GeoffArmstrongGeoffArmstrong CAMember ✭✭

    Yeah, basically the way to handle PCL stuff calling non-PCL stuff is to have an interface in the PCL project implemented by parallel objects in the non-PCL projects, and use the dependency resolver to resolve that.

    For some of my objects, I have an abstract object declared in the PCL project that implements all the common logic, and this is overridden in platform projects with overrides to implement things like loading and saving that are platform-specific. Then I have an IPlatformSpecific interface which will return something based on the abstract object.

Sign In or Register to comment.