Yes sure, I think it is a fairly usual case.
I set the binding in code:
c_slider = GetTemplateChild("PART_slider") as Slider;
c_sliderBinding = new Binding("SliderValue");
c_sliderBinding.Source = c_propertyItem;
c_sliderBinding.Path = new PropertyPath("Value");
c_sliderBinding.Mode = BindingMode.TwoWay;
c_sliderBinding.Converter = new NsUIConverters.NsFloatToInt();
BindingOperations.SetBinding(c_slider, Slider.ValueProperty, c_sliderBinding);
The exception should have been thrown during the SetBinding() call because it
runs the converter which throws an exception. However what happened is that the
next Noesis Code that happens to run throws that exception instead.
I have another Converter issue where I get a call to Convert when I expected
ConvertBack to be called. I don't know enough about WPF to know if this is a bug
though. I expected ConvertBack to be called every time the target changes and
Convert every time the source changes. It that is supposed to be the case you
have another bug there.
Another thing that isn't really a bug but it is very annoying is that the code
that builds Noesis Assets must have write rights to the source files. This makes
it so I must check out every UI source file and run reimport every time I open
Unity. This goes for font files too. It is not necessary since you never change
anything in the source file. To be clear in order to properly build
MyMenu.asset, MyMenu.xaml must not be write protected. |