wpf - How do I attach a converter to this (short-hand?) binding? -



wpf - How do I attach a converter to this (short-hand?) binding? -

i have contentpresenter features binding:

class="lang-xml prettyprint-override"><contentpresenter content="{binding}"/>

adding converter fails:

class="lang-xml prettyprint-override"><contentpresenter content="{binding, converter={staticresource dummyconverter}}"/>

error: the character "," unexpected @ position.

this might stupid question couldn't find answer: {binding} short (so can attach converter total expression)? if not, how attach converter?

you may either drop comma:

class="lang-xml prettyprint-override"><contentpresenter content="{binding converter={staticresource dummyconverter}}"/>

or explicitly set path source object:

class="lang-xml prettyprint-override"><contentpresenter content="{binding path=., converter={staticresource dummyconverter}}"/>

wpf

Comments

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -