I have been tasked with working on a legacy application. This application is written in VB.NET WinForms, and there is quite a lot of code in the project already to handle things like database connectivity, error handling, reporting, logging, user notifications, etc.
The last developer to work on the app added a second project to the solution for a custom WPF control he created. It's still titled "WpfControLibrary1", and the control is "UserControl1" so i'm guessing he didn't spend much time on it. The control itself uses MVVM C# and it's been added into a winform in the original project with no code behind it.
My question is this: How can I access this pre-existing classes, modules, and forms in the original project from the new control?
For example, if I want to export data to Excel in the old project I would simply instantiate the "DataExport" class and pass the dataset to its "ToExcel" method. Similarly, how could I access a property/method from the main form?
I'm really not very familiar with WPF, and could use a nudge in the right direction. Perhaps i'm not searching for the right terms, or maybe it's just not possible. However, I'm really not looking to re-invent the wheel here, just need to figure out how to leverage/access the pre-existing code for what would normally be 5 minutes worth of work if it weren't for the WPF.
Thanks in advance for your time.