Current Date in Silverlight XAML TextBlock

后端 未结 3 1482
闹比i
闹比i 2021-02-09 01:59

I am coming from Flex where you can do just about anything inside of curly braces. I am trying to get a TextBlock to display today\'s Date and Time without just cod

3条回答
  •  鱼传尺愫
    2021-02-09 02:38

    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    
    Text="{Binding Source={x:Static sys:DateTime.Today}, StringFormat='Today is {0:ffffdd, MMMM dd}'}"
    

提交回复
热议问题