Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

New Post: How to organize ViewModels the right way?

$
0
0
Yes, definitely, getting again through the documentation helped a lot:
https://caliburnmicro.codeplex.com/wikipage?title=Screens%2c%20Conductors%20and%20Composition&referringTitle=Documentation

I have a shell which is a Conductor(Of IScreen).Collection.AllActive, then the first screen (PanelsView) is a Conductor(Of Screen). It all works nicely. The PanelsView has all the buttons created for activating each panel, and then this container into which the framework loads a view after a button is pressed:
<ContentControl x:Name="ActiveItem" />
where each button does something like (with a different view model for each button, obviously)
    Public Sub ShowEntryPanel()
        Dim item As EntryViewModel = IoC.GetInstance(GetType(EntryViewModel), Nothing)
        ActivateItem(item)
    End Sub
It is all very closely following the documentation really. Whether it is "the right way", or not, I cannot really say, but it works the way I want it to :)

Viewing all articles
Browse latest Browse all 1760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>