[question] can i add constructor to a WPF window?

i have a CustomWindow and i call it like this:

var myWin = new CustomWindow(); myWin.Show(); 

it works fine so far but if i add a constructor to CustomWindow and call it like below i would see an empty window instead of the WPF window that i am suppose to see:

var myWin = new CustomWindow(someVariables); myWin.Show(); 

so i was wondering if it was possible to add a constructor to a Window class like other classes?

by pooya87 via /r/csharp

Leave a Reply