Added wpf form Init method