WPF version

WF->WPF convertion