I have a:
- TreeView with ContextMenu and one MenuItem called "New File"
- Toolbar with Button also called "New File"
- Function with InputDialog and File creation
What would be a good approach to share functionality between a context menu and a toolbar? Static class, Singleton or is there something better?
I don't want to create the same function twice.