Skip to content

Instantly share code, notes, and snippets.

@rohits79
Created June 7, 2016 09:57
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 rohits79/36649140b2843ca4aefe2d33e1619bd1 to your computer and use it in GitHub Desktop.
Save rohits79/36649140b2843ca4aefe2d33e1619bd1 to your computer and use it in GitHub Desktop.
static void Bind(object view, object viewModel)
{
FrameworkElement element = view as FrameworkElement;
if (element != null)
element.DataContext = viewModel;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment