开发者

How to access typeconverted elements declared in XAML?

I declared

<sys:DateTime> 2009/09/01 3:33:33 
</sys:DateTime>  in xaml via <ListBox xmlns:sys="clr-namespace=System;assembly:mscorlib" >

开发者_如何学CI'm doing this

DateTime newDate = ((DateTime)(MyListBox.Items.GetItemAt(1)));
newDate = DateTime.Now;

but sys:DateTime's value is not changing??


DateTime is a value type. It will not exhibit reference semantics like you wish. You'll have to assign back to the original in order to update it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜