Ejemplo n.º 1
0
        private void formatMarginsMenuItem_Click(object sender, RoutedEventArgs e)
        {
            // Instantiate the dialog box
            var dlg = new MarginsDialogBox
            {
                Owner          = this,
                DocumentMargin = documentTextBox.Margin
            };

            // Configure the dialog box

            // Open the dialog box modally
            dlg.ShowDialog();

            // Process data entered by user if dialog box is accepted
            if (dlg.DialogResult == true)
            {
                // Update fonts
                documentTextBox.Margin = dlg.DocumentMargin;
            }
        }
Ejemplo n.º 2
0
        private void formatMarginsMenuItem_Click(object sender, RoutedEventArgs e)
        {
            // Instantiate the dialog box
            var dlg = new MarginsDialogBox
            {
                Owner = this,
                DocumentMargin = documentTextBox.Margin
            };

            // Configure the dialog box

            // Open the dialog box modally 
            dlg.ShowDialog();

            // Process data entered by user if dialog box is accepted
            if (dlg.DialogResult == true)
            {
                // Update fonts
                documentTextBox.Margin = dlg.DocumentMargin;
            }
        }