void DecorateClassificationTypes() { if (_ClassificationFormatMap.IsInBatchUpdate) { return; } _ClassificationFormatMap.BeginBatchUpdate(); var defaultSize = _ClassificationFormatMap.DefaultTextProperties.FontRenderingEmSize; foreach (var item in _ClassificationFormatMap.CurrentPriorityOrder) { StyleBase style; TextFormattingRunProperties textFormatting; if (item == null || (style = TextEditorHelper.GetStyle(item.Classification)) == null || (textFormatting = TextEditorHelper.GetBackupFormatting(item.Classification)) == null) { continue; } _ClassificationFormatMap.SetTextProperties(item, SetProperties(textFormatting, style, defaultSize)); } _ClassificationFormatMap.EndBatchUpdate(); Debug.WriteLine("Decorated"); }