Closed mwdpb closed 3 years ago
In future, please open a discussion to get agreement before submitting a PR!
I've considered doing this, since C.M moved away from the Bootstrapper<TRootViewModel>
pattern, but never actually had enough of a need: if you don't need TRootViewModel
, just pass any old thing and override either Launch
or DisplayRootView
.
What's the problem you're trying to solve here, which can't be solved by overriding Launch
?
After pondering, I guess its worth doing this, but I'm not sure about the name (can't come up with a good alternative but I'll keep thinking) and I think Launch needs to be abstract
In future, please open a discussion to get agreement before submitting a PR!
I've considered doing this, since C.M moved away from the
Bootstrapper<TRootViewModel>
pattern, but never actually had enough of a need: if you don't needTRootViewModel
, just pass any old thing and override eitherLaunch
orDisplayRootView
.What's the problem you're trying to solve here, which can't be solved by overriding
Launch
?
Will do. BTW, what's the preferred way to discuss PR agreement? Email or discussion board?
Cheers. Discussions for potential features, issues for bugs.
Cheers. Discussions for potential features, issues for bugs.
Got it. I think the NoRootView feature is warranted, I myself had two cases recently that are using Stylet to develop WPF libraries (non standalone WPF application). And GF-Huang's thread also showed similar need. It's true you could pass a dummy class to it to get away with existing code, but not ideal.
All the libraries I've written which had a bootstrapper also had a root vm, it something which was treated as the main window. Often the consuming application would define the bootstrapper itself.
The concept of a main window is very much baked into WPF, don't forget
Not that I'm too opposed to this, just arguing the case before deciding whether to add extra complexity to something which already confuses people
I had to rebase this onto develop, which loses the link with GitHub unfortunately. Merged (after tweaking) as d228af4ccc1aebdf72fad1bbfa8d9c2e88b7ecdf. Thanks!
The new added abstract class is called BootstrapperNoRootView, as its name indicated, it'll initialize Stylet without specifying RootViewModel. It is useful when using Stylet in class library development where you don't have root view controls.