示例#1
0
        public void OnActivateItem()
        {
            if (SelectedItem == null)
            {
                return;
            }

            try
            {
                var viewModel = new MetadataWindowViewModel(SelectedItem);
                var window    = new MetadataWindowView {
                    DataContext = viewModel
                };
                viewModel.RequestClose += window.Close;
                window.ShowDialog();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
示例#2
0
        public void OnActivateItem()
        {
            if (SelectedItem == null)
            {
                return;
            }

            try
            {
                MetadataWindowViewModel viewModel = new MetadataWindowViewModel(SelectedItem);
                MetadataWindowView window = new MetadataWindowView { DataContext = viewModel };

                viewModel.RequestClose += window.Close;

                window.ShowDialog();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }