Matt126
Matt126

Reputation: 997

How to use windows-phone exclusive code in a xaml code file (Win-Uiniversal App)

Does anyoneone know how to write windows-phone exclusive code in a xaml code file (universal app)? e.x. when I want to use another design for my W8.1 app as for my WP8.1 app.

I moved the MainPage.xaml and MainPage.xaml.cs to the ".Shared" folder, and thus I use the same code for both platforms.

so in Mainpage.xaml.cs I could use

#if WINDOWS_PHONE_APP

#endif

but whats the equivalent for the xaml code?

I hope you understand my question Thanks in advance, Christian

Upvotes: 0

Views: 141

Answers (1)

Robert Levy
Robert Levy

Reputation: 29083

There is no equivalent for XAML. You can create a userconteol that is forked between the project types and then reference this usercontrol from the shared xaml

Upvotes: 1

Related Questions