Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPF Preprocessor Demo

A minimal example demonstrating how to use C# preprocessor directives with WPF XAML UI variants.

Overview

This project shows how to:

  • Use C# preprocessor directives to control code behavior
  • Toggle between different XAML UI variants at compile time
  • Build the same project with different preprocessor constants

Building

Build original version:

msbuild.exe PreprocessorDemo.csproj

Build with new feature enabled:

msbuild.exe PreprocessorDemo.csproj /p:DefineConstants="fix_issue_001"

Requirements

  • Visual Studio 2019
  • .NET Framework
  • WPF

Notes

  • Clean the solution between builds when switching preprocessor directives
  • The example shows a simple counter increment (by 1 or 2) with different UI styles
  • Uses data binding with BooleanToVisibilityConverter for UI toggling

About

A minimalist WPF demo showing how to use C# preprocessor directives alongside XAML UI variants

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages