public PopularMovies() { InitializeComponent(); //getting the discover menu data for data grid //dss =((LoginWindow)System.Windows.Application.Current.MainWindow).ds; mvm.GetDiscoverMovies(dss, pagenum); txtPageNumMax.Text = $" ... {dss.Total_page.ToString()}"; }