c# - Display and update a TimeSpan -
...hello,
i explain problem : in xaml code, binded element propertie "duration" of class "mtask". "duration" type timespan.
when start method class "mtask" called mstart, want update propertie "duration" during execution of method, , display binding.
but problem don't know how keep updated time span. thinking create datetime @ beginning of method , substract current datetime.now during execution, solution?
if need more information, ask!
thanks,
y.
the easiest way write start time field , let property "duration" return datetime.now - _starttime.
update: class mtask must implement inotifypropertychanged , raise event of interface, whenever value of property changes. in case, value of property calculated on fly, need raise event cyclically while method mstart runs.
Comments
Post a Comment