AlternateContent Tags causing issues with IDE, but not compiler

前端 未结 2 1751
忘掉有多难
忘掉有多难 2021-01-04 02:23

I am working on a legacy product. I need to make regions of a complex UI optional, based on build constants. It is not feasible to move these regions into controls, so I a

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-04 02:50

    What about this:

    public class BuildConstants
    {
        public bool IsDebug
        {
            get
            {
    #if DEBUG
                return true;
    #else
                return false;
    #endif
            }
        }
    }
    

    and the xaml:

    
        
        
    
    
    
        
    
    

提交回复
热议问题