none
How to call method that is present in viewmodel from App Resuming event in App.xaml.cs?

    Question

  • Hi,

    When app comes into app.xaml.cs resuming event ,I need to call method that is present in viewmodel. But viewmodel object is created in xaml(like local:viewmodelclass x:key="vm").Please help me out how to resolve this problem.

    Thursday, September 12, 2013 1:13 PM

Answers

  • var viewModel = Application.Current.Resources["vm"] as viewmodelclass;

    if(viewModel != null)

    {

    viewModel.DoSomething();

    }



    • Marked as answer by Saikrupakar Tuesday, October 15, 2013 9:18 AM
    Friday, September 13, 2013 12:48 PM

All replies