Which binding expression should you use?

You are developing a Silverlight 4 application. The application contains a Person class that has a public nullable DateTime property named Birthday. You display a list of Person objects in a DataGrid control. One of the columns in the DataGrid control is bound to Birthday. You need to ensure that the databound column displays Birthday by using the long date format.
Which binding expression should you use?

You are developing a Silverlight 4 application. The application contains a Person class that has a public nullable DateTime property named Birthday. You display a list of Person objects in a DataGrid control. One of the columns in the DataGrid control is bound to Birthday. You need to ensure that the databound column displays Birthday by using the long date format.
Which binding expression should you use?

A.
{Binding Path=Birthday, FallbackValue=’D’}

B.
{Binding Path=Birthday, StringFormat=\{0:D\}}

C.
{Binding Path=Birthday, ConverterParameter=\{0:D\}}

D.
{Binding Path=Birthday, TargetNullValue=’LongDatePattern’}



Leave a Reply 0

Your email address will not be published. Required fields are marked *