How do I create family related projects with Windows 10 like W8.1 / WP8.1?

I am planning to port my WP8.1 app to Windows 10 as a universal app. I saw MS add the ability to create a single universal project and create different family folders containing XAML pages / controls that share the same code file. I don't like some things about this approach:

• I may have different XAML files for different devices, but with the same .cs file, so it would not be easy to create some UI logic like animations, etc.

• Since I will have one generic project, I will need to check at runtime the availability of the APIs / classes that I need instead of seeing if I can use them or not at compile time, which is much better in my opinion ...

I saw an MVA video where Jerry Nixon and Andy Wigley said that classic multi-headed universal projects will still be supported on Windows 10, but I have no idea how to set them up and I can't find any documentation anywhere.

Everyone talks about this one project with shared .cs files, but I would feel more comfortable working with a multitasking project: one for mobile phones, one for desktops and tablets, and maybe a shared project or some kind of PCL for sharing. using classes and materials between two projects (a common project with eg W8.1 / WP8.1 would be great).

Any ideas how to do this?

+3


source to share


1 answer


Technically, Windows 8.1 Universal Apps were built from 3 projects. One for Windows 8.1 for phone and general CL. While there is no template for this, you can achieve the same result by manually executing it, or create your own temple using the VS extension tools. All you have to do is create a UAP solution, another UAP project, name it accordingly, you can say that MyProjectName.Phone and the generic CL are called MyProjectName.Shared refer to a common project in the other two and you are ready to download .. ...

To target specific device families to your project, you can specify this intent in Package.Appmanifest.



<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />

      

+1


source







All Articles