I want to display today's date in XAML and then return that to my view model. So this shows it in XAML
<TextBlock Text="{Binding Source={x:Static sys:DateTime.Now}, StringFormat=dd/MMM/yyyy}"/>
but I want to return it in ModifiedDate, so I did this
<TextBlock x:Name="ModifiedDate" Text="{Binding Source={x:Static sys:DateTime.Now}, StringFormat=dd/MMM/yyyy}"/>
This doesn't work. I don't want to use datepicker. I want to use Pure XAML and do not wish to go to code. Any ideas?
you have to include this name space in your xaml..if you are not able to show date..
xmlns:sys="clr-namespace:System;assembly=mscorlib"
and if you want something different update your question..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With