Ejemplo n.º 1
0
 private void ProductsGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     currentProduct           = (Product)e.AddedItems[0];
     TitleTextBox.DataContext = currentProduct.ProductDescriptors[0];
     TitleTextBox.SetBinding(TextBox.TextProperty, "Title");
     BodyTextBox.DataContext = currentProduct.ProductDescriptors[0];
     BodyTextBox.SetBinding(TextBox.TextProperty, "Body");
     relateds = WrapRelateds(currentProduct, from p in catalog.Products select p);
     RelatedGrid.ItemsSource = relateds;
 }