"where to set the converter for items of a collection in xaml" Code Answer

1

the problem is that you are trying to convert the entire collection rather than just one item from the collection.

you would want to do something like this:

<listbox itemssource="{binding yearscollection}">
    <listbox.itemtemplate>
        <datatemplate>
             <border datacontext="{binding converter={staticresource inttostringyearconverter}">
             ...
             </border>
        </datatemplate>
    </listbox.itemtemplate>
</listbox>
By johnbronn12-0000d0b84fc0 on April 15 2022

Answers related to “where to set the converter for items of a collection in xaml”

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