I have a Listbox with horizontal orientation and I need the Textblock values to be separated by commas.
I've reached this solution:
<DataTemplate x:Key="toStringDataTemplate">
<TextBlock Margin="2,0,0,0" TextWrapping="Wrap">
<Run Text="{Binding name}"/>
<Run Text=","/>
</TextBlock>
</DataTemplate>
But this outputs trailing commas: value1,value2,value3,
I need the last comma to be collapsed if its the last item in the Observable Collection.
Any help would be appreciated.