Hello, I have many places in my project where I load a view into RadTabControl (TabRegion) and I would like to refactor it to some kind of simple command or function.
This is my code to refactor:
I've tried to generate class in my Infrastructure module that would work like that:
but I really don't know how to do this (especialy how to pass a type as a parameter).
Maybe there is a better way to do this? (static method, DelegateCommand or maybe CompositeCommand ?)
This is my code to refactor:
this
.regionManager.RegisterViewWithRegion(RegionNames.TabRegion, () => container.Resolve<MyCustomView>());
I've tried to generate class in my Infrastructure module that would work like that:
OpenViewInNewTab(RegionNames.TabRegion, MyCustomView);
but I really don't know how to do this (especialy how to pass a type as a parameter).
Maybe there is a better way to do this? (static method, DelegateCommand or maybe CompositeCommand ?)