在页面上,我们将转换器声明为
<phone:PhoneApplicationPage.Resources>
<local:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
</phone:PhoneApplicationPage.Resources>
如何在ResourceDictionary中声明它?
答案 0 :(得分:3)
如何在ResourceDictionary中声明它?
<local:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
答案 1 :(得分:1)
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>