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

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -