Exemple #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);
            }
        }
        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);
            }
        }