2013年9月12日星期四

Wanted List <> elements increased incidents how simple ?

My class has a property is a List <>, I want to add elements to it to make the picture Invalidate, but found the List <> does not have any events
List
then want to continue to write your own class , but found that I do not know why it's not marked as virtual Add an event

Did this demand can only List reimplement this class again to solve it ?
------ Solution ---------------------------------------- ----
ObservableCollection class
represents a dynamic data collection , you add items , remove items , or to refresh the entire list, this collection will provide notice.

------ Solution ------------------------------------ --------
http://msdn. microsoft.com/zh-cn/library/vstudio/ms668604.aspx
------ For reference only ------------------- --------------------
for some "screen ", if it List automatically bound ( ie via INotifyPropertyChnaged interfaces ) , and Also you want to use List , you can further increase List unit after this List to List property assignment again to trigger the screen refresh.
------ For reference only -------------------------------------- -
you can write a class that inherits from List override its Add method.

List so retain the original features at the same time , want to increase their own logic .
------ For reference only -------------------------------------- -


lz already said this.
------ For reference only -------------------------------------- -
  The reply deleted by an administrator at 2013-09-12 09:16:08

没有评论:

发表评论