Please forgive this plea for help - I’ve been using WPF for development for the past few months and have concluded that my Ex Delphi experience has excluded me from some fundamental knowledge…
I know this should probably be directed to the general C# forums, but the RemObjects community has been so helpful over the past months, so …
I’m using VS 2015, plus DevExpress WPF (although my ignorance is re generic C# rather than anything to do with DevExpress). My project uses a couple of C# .cs files for some common routines (no problem). In my Delphi days, I typically used the MyForm.pas files to contain the visual object stuff plus methods to call other routines - these being in separate .pas files (e.g. rtnMyForm1.pas - the prefix rtn meaning they were just “routines” related to that form). The aim was to separate the Form logic from the background algorithms.
Assuming that some of the form logic can be delegated to the XAML, my desired structure would be (ignoring the XAML):
Window1.xaml.pas - just for the window objects and calls for events
a new item created rtnWindow1,pas file created as a Class File for all the other stuff re Window1
Window2.xaml.pas - just for the window objects and calls for events
a new item created rtnWindow2.pas file created as a Class File for all the other stuff re Window2
Then what is the correct way of calling the methods in rtnWindows1 or 2 from other files (e.g. rtnSomecommonRoutines.pas)
On exploring this I’m getting errors re static methods vs dynamic. I understand some of this but clearly not enough!! Whatever Delphi’s faults (and there were many!!!) it hid you from all this.
If anyone has a really minimalistic project, structured like this, I’d be grateful for an example.
So all comments welcome (from derision to sympathy)