public CustomerView() { VM = new CustomerViewModel(this); DataContext = VM; InitializeComponent(); VM.InitAsync(); Init(null); }
private async void Page_Loaded(object sender, RoutedEventArgs e) { var dc = new CustomerViewModel(); this.DataContext = dc; await dc.InitAsync(); }