예제 #1
0
 private void FormatDocument(Document document, IStylerOptions stylerOptions = null)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     try
     {
         if (document.IsFormatable())
         {
             SetupFormatDocumentContinuation(document, stylerOptions ?? this.optionsHelper.GetDocumentStylerOptions(document))()();
         }
     }
     catch (Exception ex)
     {
         this.ShowMessageBox(ex);
     }
 }
예제 #2
0
 private void FormatDocument(Document document, IStylerOptions stylerOptions = null)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     try
     {
         var xamlLanguageOptions = document.GetXamlLanguageOptions();
         if (xamlLanguageOptions.IsFormatable)
         {
             SetupFormatDocumentContinuation(document, stylerOptions ?? this.optionsHelper.GetDocumentStylerOptions(document), xamlLanguageOptions)()();
         }
     }
     catch (Exception ex)
     {
         this.ShowMessageBox(ex);
     }
 }