wpf - Bind to static generic instance of a class -


i use code in views' (which usercontrol) constructors:

this.datacontext = the<chart1viewmodel>.instance; 

where the<> generic static per-type singleton storage needs to implement inotifypropertychanged notify of it's instance replacement.

i xaml code like, how can that? have never before did bind generic static classes.

if can't, how create binding static class' instance property?

as far know you'll have problems using generics in xaml. nevertheless can use static classes. wrapping property around generic this:

<control datacontext="{x:static the.chart1viewmodel.instance}" /> 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -