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

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

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -