1
对不起,F#...XAML转换到另一个项目
我有以下类VS项目:
namespace ABCCommonSilverlight
module ConvertersAndFormatters =
type FixedDecimalConverter() =
interface IValueConverter with
member this.Convert(value, targetType, parameter, culture) =
if value = null then
"N/A" :> obj
else
(decimalFormatter (value :?> Double)) :> obj
member this.ConvertBack(value, targetType, parameter, culture) = raise <| NotImplementedException()
而且我引用其中有一个XAML另一个项目本项目资源文件,它看起来像这样...
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:y="clr-namespace:ABCCommonSilverlight;assembly=ABCCommonSilverlight">
<y:ConvertersAndFormatters.FixedDecimalConverter x:Key="abcFixedDecimalConverter" />
</ResourceDictionary>
没有ConvertersAndFormatters.
在FixedDecimalConverter
前我得到:
异常“找不到类型”FixedDecimalConverter“。”
并与“ConvertersAndFormatters”。我得到:
异常“无法设置属性元素的属性。”
任何想法什么是正确的方式来做到这一点?