コード例 #1
0
 public NewDocumentDialog()
 {
     InitializeComponent();
     DocumentWidth      = 80;
     DocumentHeight     = 80;
     EnableCompression  = true;
     WidthTextBox.Text  = DocumentWidth.ToString();
     HeightTextBox.Text = DocumentHeight.ToString();
 }
コード例 #2
0
 private void HeightTextBox_OnLostFocus(object sender, RoutedEventArgs e)
 {
     if (sender is TextBox textBox)
     {
         if (int.TryParse(textBox.Text, out var height))
         {
             DocumentHeight = height;
         }
         else
         {
             textBox.Text = DocumentHeight.ToString();
         }
     }
 }