I am beginner to WPF. There are three tabs in my application each tab with same functionality that is(Each tab has a grid bind to database). Grid in each tab is bind to different database table but functionality is same that is to add, delete, refresh edit. I wrote all functionality in Mainwindow.cs file.
I want that all code should be placed in three different classes. For Example.
There are three tables:
- Table A ---- bind to Grid named as grid.
- Table B ---- bind to Grid named as grida
- Table C ---- bind to Grid named as gridb
All functionality of operations Edit, Refresh, Add, Delete in MainWindow.cs file. Code lines 637. I want that : There should be three classes each defining their functionality separately. Problem is : How to pass grid name to these classes as it is defined in Mianwindow.Xaml! or is there any other better way to solve this.
I need your suggestions. Thank you.