コード例 #1
0
        void dgWebPages_RowDoubleClick(object sender, MouseButtonEventArgs e)
        {
            dgWebPages.CancelEdit();
            // https://stackoverflow.com/questions/16236905/access-parent-window-from-user-control
            var dlg = new PatternsWebPagesDetailDlg(Window.GetWindow(this), vmWP, (MPatternWebPage)((DataGridRow)sender).Item);

            dlg.ShowDialog();
        }
コード例 #2
0
        void btnAddWebPage_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new PatternsWebPagesDetailDlg(Window.GetWindow(this), vmWP, vmWP.NewPatternWebPage());

            dlg.ShowDialog();
        }