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); } }
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); } }