Does anyone have any idea if it is possible to inherit from the Window class of WPF, create some properties and when to create my screens instead of making them inherit from Window make them inherit from that created class?
An example:
I have a method that loads a list of files in the database; for the screen does not stay static I pass the form reference to the method and I change the property that does the binding with Progressbar as the progress of the operation.
The problem is that this method is used by more than one screen and since the Window class does not have the binding property with Progressbar to work the method I need to reference the specific form, the question is that if I have 10 forms that use this method would need to have 10 different calls to it to handle each individually.I tried to pass the Window as a reference and then get the Name of the Form, but it does not work, does anyone know of any other way to do it and / or a way to create an abstract class inherited from Window and add the properties I need? So when passing the reference passed this abstract class would have the properties.
I also tried to pass the property by reference, but Visual Studio says it is not possible to pass a property by reference.