Is it possible to use string formatting string.Format("stuff happened on {0}", date), but also format the date using date formatting?
I could of course use string.Format("stuff {0}", date.ToString("d")); however, that won’t fly when I’m using StringFormat in a XAML binding like this:
<TextBlock Text={Binding SomeDate,StringFormat='{}stuff happened on {0}'} />
This is possible using the lesser-known optional parts of the format item. Those are alignment and formatString in
index [,alignment] [:formatString].So, I can answer my question using the following: