tags:

views:

132

answers:

1

I have a TextBlock thats bound to a DateTime property how do i configurate the format of the date?

+1  A: 

There is a string format property available when you are declaring the binding:

<Textbox Text={Binding Path=DateTimeValue, StringFormat=dd-MM-yyyy} />

(You need to be on .NET 3.5 SP1 for this property to exist)

Martin Harris