How do I programmatically do the following (from the XAML):
<TextBox Name="OrderDateText"
Text="{Binding Path=OrderDate, StringFormat=dd-MM-yyyy}"
public DateTime OrderDate
Right now I have the following
TextBox txtboxOrderdDate = new TextBox();
And I know I need to do something like
Binding bindingOrderDate = new Binding();
bindingOrderDate.Source = "OrderDate";
But I am stuck here ... not sure how to proceed to apply the StringFormat nor am I sure that SOURCE is the correct way (should I be using ElementName?)