【发布时间】:2020-07-02 16:36:25
【问题描述】:
我需要相同的 Does XAML have a conditional compiler directive for debug mode? 但在 Xamarin xaml 中;我已经尝试了建议的解决方案,但出现此错误:
Type mc:Choice not found in xmlns http://schemas.openxmlformats.org/markup-compatibility/2006
我尝试使用 xcc https://github.com/firstfloorsoftware/xcc,但它似乎不适用于 .netstandard 2.0 / Xamarin.Forms 4.5
【问题讨论】:
-
这是 WPF 的解决方案,而不是 Xamarin
-
我知道,我想在 xamarin 中实现类似的结果
-
如果你想在app.xaml中添加全局
style,如果是,你可以像这个线程一样添加:docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/… -
到目前为止,您是否找到了一些东西,(我正在寻找相同的条件构建,例如在调试模式下忽略此 xaml 行),而不是答案中提到的设计时间)
标签: c# xaml xamarin xamarin.forms