private void btnEditMatching_Click(object sender, RoutedEventArgs e) { RadButton btn = sender as RadButton; ProStyleMatchingBO matching = btn.DataContext as ProStyleMatchingBO; if (matching != null) { StylePictureAlbum album = this.DataContext as StylePictureAlbum; if (album != null) { WinStyleSelectForMatching win = new WinStyleSelectForMatching(album, matching); win.Owner = View.Extension.UIHelper.GetAncestor <Window>(this); win.ShowDialog(); } } }
private void btnAddMatching_Click(object sender, RoutedEventArgs e) { StylePictureAlbum album = this.DataContext as StylePictureAlbum; if (album != null) { WinStyleSelectForMatching win = new WinStyleSelectForMatching(album); win.Owner = View.Extension.UIHelper.GetAncestor <Window>(this); //win.SaveSucceedEvent += () => //{ // style.SelectedPicture.Matchings = null; // BindingExpression be = icMatching.GetBindingExpression(ItemsControl.ItemsSourceProperty); // be.UpdateTarget(); //}; win.ShowDialog(); } }