How to programmatically do the following (from XAML):
<TextBox Name="OrderDateText" Text="{Binding Path=OrderDate, StringFormat=dd-MM-yyyy}" public DateTime OrderDate
Now i have
TextBox txtboxOrderdDate = new TextBox();
And I know that I need to do something like
Binding bindingOrderDate = new Binding(); bindingOrderDate.Source = "OrderDate";
But I'm stuck here ... not sure how to get started with StringFormat, and I'm not sure SOURCE is the right way (should I use ElementName?)
source share