Allow conditional compile statements in XAML markup
This suggestion is migrated to Developer Community. Please use below link to view the current status.
Allow the XAML markup editor to allow conditional compile statements so that a developer could have #ifdef statements in their markup
Thank you for using Visual Studio and for your commitment to improving it. We are currently evaluating whether we will be able to include this into the product. We will be providing an update soon.
Program Manager, Visual Studio
A classic example for Uservoice: It takes MSFT 3 years to show any reaction, which is the just promise to "provide an update soon". About one year later and nothing...
This is about to implement simple #ifdef in the XAML compiler. No fancy stuff, no macro expansions, just conditional compilation. What's the problem?
James Abbott commented
This!! Lots of times when I'm debugging I'll use a standard resource dictionary, but when in Release Mode I want to use a cached (I'm sure you've heard of it) StaticResourceDictionary. This is just not possible as far as I can tell currently, I'm sure there are dozens of other uses for this though!