wpf - Adding Converter declaration -
i try insert image gui application means of binding , converter. create instance of value converter in resources of mainwindow:
"xmlns:my1="clr-namespace:myapp" <window.resources> <resourcedictionary x:key="resc"> <resourcedictionary.mergeddictionaries> <resourcedictionary source="stylesdictionary.xaml"/> </resourcedictionary.mergeddictionaries> </resourcedictionary> <my1:directiontoimageconverter x:key="directiontoimageconverter"/> </window.resources> however, when try run application following exception:
''resources' property has been set on 'mainwindow'.' line number '16' and
line position '11'.
please help. lot in advance.
you need put converter in resource dictonary, see question.
<window.resources> <resourcedictionary x:key="resc"> <resourcedictionary.mergeddictionaries> <resourcedictionary source="stylesdictionary.xaml"/> </resourcedictionary.mergeddictionaries> <my1:directiontoimageconverter x:key="directiontoimageconverter"/> </resourcedictionary> </window.resources>
Comments
Post a Comment