Skip to content

Instantly share code, notes, and snippets.

@tomwis
Last active October 1, 2017 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomwis/498cca52b21a593f0e128c723ac0a567 to your computer and use it in GitHub Desktop.
Save tomwis/498cca52b21a593f0e128c723ac0a567 to your computer and use it in GitHub Desktop.
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