public static FontDecoration Convert(sw.TextDecorationCollection decorations) { var decoration = FontDecoration.None; if (decorations != null) { if (sw.TextDecorations.Underline.All(decorations.Contains)) { decoration |= FontDecoration.Underline; } if (sw.TextDecorations.Strikethrough.All(decorations.Contains)) { decoration |= FontDecoration.Strikethrough; } } return(decoration); }
protected override void SetDecorations(sw.TextDecorationCollection decorations) { Control.TextDecorations = decorations; }
protected virtual void SetDecorations(sw.TextDecorationCollection decorations) { }