I’m working on a WPF/XAML app using MVVM and have a collection of strings as a property on my viewmodel. I would like to concatenate the strings for display within a textblock or similar control. The strings should be concatenated using the text ” AND ” and the concatenation text should be styled using a bold font weight. The output would look something like this:
cat AND dog AND mouse AND rabbit
What is the best way to achieve my end result?
Since you can’t bind to the read-only TextBlock.Inlines property, I would suggest to create a derived TextBlock with a
TextListproperty: