add wpf 4.0 support to samopes