Ejemplo n.º 1
0
        private MyDialogWindow CreateDialogWindow()
        {
            //var resources = Application.Current.MainWindow.Resources;
            var newWindow = new MyDialogWindow();

            newWindow.SizeToContent = SizeToContent.WidthAndHeight;
            //newWindow.Resources = resources;

            return(newWindow);
        }
Ejemplo n.º 2
0
        private void RemovePL_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            SettPopup.IsOpen = false;
            MyDialogWindow dialog = new MyDialogWindow();

            dialog.TX.Text = "Удалить этот плейлист?";
            dialog.Owner   = this;
            dialog.ShowDialog();
            if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
            {
                playLists.Remove((sender as TextBlock).DataContext as PlayList); //удаляем плейлист
                PL_ListBox.ItemsSource = new List <PlayList>(playLists);         //обновляем окно плейлистов
                SetVisiblePlayListsControl();                                    //отображаем окно плейлистов
                CenterAnim(PListControl);
            }
        }
Ejemplo n.º 3
0
 private void SetDialogWindowProperties <T>(MyDialogWindow newWindow, T viewModel) where T : ViewModelBase
 {
     newWindow.Title   = viewModel.Title;
     newWindow.Content = viewModel;
 }