private void Button_Click(object sender, RoutedEventArgs e) { ÜrünSayfası ürünSayfası = new ÜrünSayfası(); var window = (MainWindow)Application.Current.MainWindow; window.Main.Content = ürünSayfası; }
private void Product_Click(object sender, RoutedEventArgs e) { int PId = Convert.ToInt32((sender as Button).Tag); var window = (MainWindow)Application.Current.MainWindow; ÜrünSayfası ürünSayfası = new ÜrünSayfası(); foreach (var item in window.Products) { if (PId == item.Id) { ürünSayfası.productInfo.Text = item.Info; ürünSayfası.productName.Content = item.Name; ürünSayfası.swiperImage.Source = new BitmapImage(new Uri(item.ImageUrl)); ürünSayfası.productCost.Content = item.Cost.ToString(); ürünSayfası.MinTaksitTutarı.Text = (item.Cost / 12).ToString("C") + "TL"; ürünSayfası.productSayfaIsim.Content = item.Name; break; } } window.Main.Content = ürünSayfası; }