c# - RoutedPropertyChangedEventArgs for WPF slider - "type or namespace could not be found" -
i'm following this example create simple slider value can use in windows store app.
however, when creating something_valuechanged (as per example) , try add routedpropertychangedeventargs of type double argument method, getting standard "the type or namespace name not found" error.
i've tried looking around @ other examples this seemed suggest missing 'using' imports such system.windows , system.windows.controls. however, getting latter missing (type or namespace...)!
here's relevant sections of code using in mainpage.xaml , mainpage.xaml.cs:
xaml:
<grid ...> <grid ...> ... <slider name="binsize" width="300" height="20" background="gray" maximum="100" minimum="0" canvas.left="50" canvas.top="50" valuechanged="binsize_valuechanged"/> </grid> </grid> cs:
private void binsize_valuechanged(object sender, routedpropertychangedeventargs<double> e) { //nothing yet } could please tell me i'm doing wrong here?
if coding windows 8 app method signature/content should this:
private void binsize_valuechanged(object sender, rangebasevaluechangedeventargs e) { string msg = string.format("current value: {0}", e.newvalue); this.textblock1.text = msg; } here msdn example toward bottom of page.
the tutorial following part work windows 8 app designed wpf (windows presentation foundation) application may vary slightly. whenever errors google name of item using , find windows 8 version.
i hope helps. best of luck.
Comments
Post a Comment