Help with C# code for wpf application - C#