Skip to content

Instantly share code, notes, and snippets.

@AnsonSmith
Created October 8, 2010 20:26
Show Gist options
  • Save AnsonSmith/617470 to your computer and use it in GitHub Desktop.
Save AnsonSmith/617470 to your computer and use it in GitHub Desktop.
public class ShellViewModel : Conductor<Screen>.Collection.OneActive
{
public int ScreenCount
{
get { return this.Items.Count; }
}
public ShellViewModel()
{
}
public void NewScreen()
{
ActivateItem(new RandomScreenViewModel());
}
public override void ActivateItem(Screen item)
{
base.ActivateItem(item);
NotifyOfPropertyChange(() => ScreenCount);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment