I succesfully created some constants in Silverlight's XAML like that
<sys:Boolean x:Key="foo">True</sys:Boolean>
However, when I try to do the same with a DateTime
(to initialize some DatePicker
controls)
<sys:DateTime x:Name="myDate"/>
the system throws an XamlParseException
"Unknown element: DateTime. [Line: xxx Position: xxx]"
Is there a way to declare DateTime
constants (I'm thinking of DateTime.Now
) in XAML?