I’ll throw in one other helpful use case as well.
I have a Main View form in my application with 4 tabs, each having their own GridView.
[Picture 1 shows the form]
Each GridView has 3 main processes underlying it.
- GridView Events (such as visual formatting of items)
- Context Menu events for right click options
- Sub routines for general code blocks specific to working with that GridView
[Picture 2 shows the Regions used to segregate those 3 main components of each GridView]
Take a look at how I’ve used regions to organize those.
[Picture 3 shows how I’ve encapsulated specific methods to make it easier to navigate to when changes need made, and just how many methods there are in just one section.]
Now take a look at just how many methods are just for the Site Equipment GridView Events
Regions make it a whole lot easier for me to navigate to certain sections of this particular form and modify code as needed for whatever process I’m working with.
I hope this information sheds some light on how #Regions can be used effectively and efficiently.