Example #1
0
        void PageSetupOnClick(object sender, RoutedEventArgs e)
        {
            PageMarginsDialog dlg = new PageMarginsDialog()
            {
                Owner       = this,
                PageMargins = marginPage
            };

            if (dlg.ShowDialog().GetValueOrDefault())
            {
                // Save page margins
                marginPage = dlg.PageMargins;
            }
        }
Example #2
0
        void PageSetupOnClick(object sender, RoutedEventArgs args)
        {
            // Create dialog and initialize PageMargins property.
            PageMarginsDialog dlg = new PageMarginsDialog();

            dlg.Owner       = this;
            dlg.PageMargins = marginPage;

            if (dlg.ShowDialog().GetValueOrDefault())
            {
                // Save page margins from dialog box.
                marginPage = dlg.PageMargins;
            }
        }