Posts

Showing posts from 2014

WPF: a generic value converter

Image
The task A value converter in WPF offers the possibility to present properties in data bindings in different ways without changing the view model which contains the data property and without the need to include extra logic in XAML or code-behind. All you have to do is implement the IValueConverter interface in the converter class and use the converter in the XAML code. The problem is if you have lots of converter implementations that you have to maintain. In larger projects, a lot of these classes can accumulate, where you basically end up coding nearly the same logic again and again, only with different types. One solution for this problem is to use generic types for the converter. There are a lot of examples to do this for generic bool-to-value converters (e.g. in the answer here ). The advantage is that the converter logic is implemented only once and the output type of the conversion is generic - although it is a concrete type in the specific converter class, but this can be do

JNI (PC Java / Android) wrapper for native FFT code

See the repository here: https://github.com/StefanLober/fft