示例#1
0
        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();
                }
            }
        }
示例#2
0
        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();
            }
        }