我知道你可以像這樣的東西做在代碼隱藏...有沒有辦法忽略XAML拋出的Visual Studio錯誤?
#pragma warning disable 67
...
#pragma warning restore 67
但是,有沒有辦法做到這種類型的事情在XAML?
例如,我有我的App.xaml以下...
<FontFamily x:Key="ExtendedFontFamily">Verdana</FontFamily>
它不斷拋出我這些VS錯誤(即使它成功地生成)...
錯誤1類型'FontFamily'不是 可用作對象元素,因爲它 未公開或未定義 公共無參數構造函數或 類型 轉換器。 C:\ Users \ jed.hunsaker \ Documents \ Work \ NextGen \ src \ ESO.App.Reporting \ ESO.App.Reporting.UI.Silverlight \ App.xaml 8 4 ESO.App.Reporting.UI.Silverlight
和...
錯誤2型 '的FontFamily' 不 支持直接 內容。 C:\ Users \ jed.hunsaker \ Documents \ Work \ NextGen \ src \ ESO.App.Reporting \ ESO.App.Reporting.UI.Silverlight \ App.xaml 8 42 ESO.App.Reporting.UI.Silverlight
除非你們知道在App.xaml中存儲FontFamily的更好方法,否則我都是耳朵!