View:
I want to format the Date to \"dd/MM/yyyy\", in other words, without the time.
I
You can do this in xml itself. Here...
<DatePicker
SelectedDate="{Binding Date, Mode=TwoWay}"
Text="{Binding ., StringFormat='dd/MM/yyyy'}"/>
why to complicate? You can use compiled data binding
{x:Bind ViewModel.PropertyWithDateTime.ToString("....")}
There is an excellent example here:
Example from MSDN
if your converter class is in a different namespace (as suggested to be in a separate folder) you can add
xmlns:conv="using:MyNamespace.Converters"
and use it like this:
<UserControl.Resources>
<conv:DateToStringConverter x:Key="Converter1"/>
</UserControl.Resources>
the rest should stay the same as in the example from the link.