Tuesday, March 31, 2015

StringFormat or converter for binding dates?

Hi,


I have a datetime that is being bound to a listbox and I only want to show the time portion of it.

I've tried


<TextBlock Text ="{ Binding TimeFeedStart, StringFormat=t }" Margin ="3,0,0,0"/>


But this throws an error.


Am I correct in thinking that StringFormat doesn't work on binding in windows apps?


If this is the case, can someone please help me with a converter that I can use to get the output I require?


Any help is gratefully received.


Thanks


No comments:

Post a Comment