Different views with different code behinds but one binary in Windows 10

298 views Asked by At

I have been reading this which suggests that in windows 10 you can use different xaml views (with the same code behind) for different device families.

My question is whether you can use different views with different code behinds for different device families and still produce one binary.

I know that I can use two head projects with one shared project and achieve the behavior I want but that would produce two binaries.

EDIT: To make the question a little bit more specific. Can I add a blank page(for example) with its code behind, to the DeviceFamily-Mobile folder and then use it, or must I use only "codebehindless" xaml files in that folder?

1

There are 1 answers

1
Shawn Kendrot On BEST ANSWER

Have you tried it? If you try it you will answer your own question.

Yes you can should still be able to add "regular" xaml pages/user controls to this folder with code behind. You can also have a "shared" code behind file as I described in the blog as well.