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
Post a Comment