Skip to content

Instantly share code, notes, and snippets.

@tomwis
Last active Oct 1, 2017
Embed
What would you like to do?
public partial class App : Application
{
static ViewModelLocator _locator;
public static ViewModelLocator Locator => _locator ?? (_locator = new ViewModelLocator());
public App()
{
InitializeComponent();
Resources["Locator"] = Locator;
// ...
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment