"use converter on bound items in combobox" Code Answer

5

you can modify the itemtemplate of the combobox and use your converter:

<combobox itemssource="{binding}">
  <combobox.itemtemplate>
    <datatemplate>
      <textblock text="{binding converter={staticresource idprefixvalueconverter}}"/>
    </datatemplate>
  </combobox.itemtemplate>
</combobox>

each item is bound to the items in the itemssource. by using the converter in the binding you are able to perform the conversion you want.

By Ahmad Abu Ghoush on July 4 2022

Answers related to “use converter on bound items in combobox”

Only authorized users can answer the Search term. Please sign in first, or register a free account.