Selaa lähdekoodia

其他 - 补充遗漏代码

sunhaonan 1 vuosi sitten
vanhempi
commit
cd0a710c25

+ 6 - 1
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateSignatureDialog.xaml.cs

@@ -381,7 +381,7 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
         {
             if (TextName.SelectedIndex != -1 && IsPageLoaded)
             {
-                InPutTextBox.FontFamily = new System.Windows.Media.FontFamily((TextName.SelectedItem as ComboBoxItem).Content.ToString());
+                InPutTextBox.FontFamily = new System.Windows.Media.FontFamily((TextName.SelectedItem as ComboBoxItem)?.Content.ToString());
             }
         }
 
@@ -541,5 +541,10 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                 }
             }
         }
+
+        private void TextName_Loaded(object sender, RoutedEventArgs e)
+        {
+            InPutTextBox.FontFamily = new System.Windows.Media.FontFamily((TextName.SelectedItem as ComboBoxItem)?.Content.ToString());
+        }
     }
 }