Here is a solution that defines FontWeight, FontStyle, TextDecorations (cross out, underline) and Super- and Subscript.
TextRange textRange = new TextRange(rtb.Selection.Start, rtb.Selection.End);
bool IsTextUnderline = false;
bool IsTextStrikethrough = false;
bool IsTextBold = false;
bool IsTextItalic = false;
bool IsSuperscript = false;
bool IsSubscript = false;
if (textRange.GetPropertyValue(Inline.TextDecorationsProperty).Equals(TextDecorations.Strikethrough))
IsTextStrikethrough = true;
else if (textRange.GetPropertyValue(Inline.TextDecorationsProperty).Equals(TextDecorations.Underline))
IsTextUnderline = true;
if (textRange.GetPropertyValue(Inline.FontWeightProperty).Equals(FontWeights.Bold))
IsTextBold = true;
if (textRange.GetPropertyValue(Inline.BaselineAlignmentProperty).Equals(BaselineAlignment.Subscript))
IsSubscript = true;
else if (textRange.GetPropertyValue(Inline.BaselineAlignmentProperty).Equals(BaselineAlignment.Superscript))
IsSuperscript = true;
source
share