I have this textblock
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0}, {1}, {2}, ">
<Binding Path="object.strProp1" />
<Binding Path="object.strProp2" />
<Binding Path="object.strProp3" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
Let's assume object is not null and *strProp1* = "strProp1", *strProp2* = "strProp2", and *strProp2* = "strProp2".
The output for this would be something like this:
strProp1, strProp2, strProp3,
What I would like to know is how to remove the ',' whenever object is null or one of the properties is empty. That is, if object is null then the Textblock would just be empty. Or if one of the objects is empty then it will just be empty.
Any recommendations on how to this? Thanks! Edit: preferably in xaml only :)