Skip to content

Un pré-processeur qui permet de modifier des fichiers XML à l'aide de commentaires spéciaux.

License

Notifications You must be signed in to change notification settings

titanix/XamlPreprocessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

XamlPreprocessor

What?

A command line utility + MSBuild Task to enable conditional compilation like directives in XAML files. Compatible Visual Studio 2010+ and Xamarin Studio.

Why?

  • To mutualise UI code between Windows Phone, Windows 8 and 10 apps
  • To make different versions of an application with the ease of conditional compilation directives
  • Incidentally any other light XML transformations

Illustration

The emulator (right) features two removed lines in the first section, and color attributes manipulations (injection, replacement and conditional injection) based on build symbols. alt text

How?

English

Using a special syntax for comment you can conditionally remove node, add or remove attribute, or remove directives. Boolean expression let you specify complex condition.

Detailed syntax explanation.

French

À lire absolument, car cela fait office de documentation :

IRL

Used since May 2013 to build multiple versions of my Windows Phone Japanese-French Dictionary.

Usage

The project build an executable which can be used either:

  • in command line
  • as a MSBuild Task
The command line syntax is:
XamlPreprocessor.exe <SYMBOL_LIST> <input_file.xml> <output_file.xml>
SYMBOL_LIST is a list of comma separated symbols (eg. DEBUG;WINDOWS_PHONE)

For the MSBuild integration, see the sub projects IntegrationDemoApp.

About

Un pré-processeur qui permet de modifier des fichiers XML à l'aide de commentaires spéciaux.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages