示例#1
0
        bool HasDecorations(swd.TextRange range, sw.TextDecorationCollection decorations)
        {
            swd.TextRange realRange;
            var           existingDecorations = range.GetRealPropertyValue(swd.Inline.TextDecorationsProperty, out realRange) as sw.TextDecorationCollection;

            return(existingDecorations != null && decorations.All(r => existingDecorations.Contains(r)));
        }
示例#2
0
 bool HasDecorations(swd.TextRange range, sw.TextDecorationCollection decorations, bool useRealPropertyValue = true)
 {
     swd.TextRange realRange;
     sw.TextDecorationCollection existingDecorations;
     if (useRealPropertyValue)
     {
         existingDecorations = range.GetRealPropertyValue(swd.Inline.TextDecorationsProperty, out realRange) as sw.TextDecorationCollection;
     }
     else
     {
         existingDecorations = range.GetPropertyValue(swd.Inline.TextDecorationsProperty) as sw.TextDecorationCollection;
     }
     return(existingDecorations != null && decorations.All(r => existingDecorations.Contains(r)));
 }
示例#3
0
        bool HasDecorations(swd.TextRange range, sw.TextDecorationCollection decorations)
        {
            var existingDecorations = GetPropertyValue(range, swd.Inline.TextDecorationsProperty) as sw.TextDecorationCollection;

            return(existingDecorations != null && decorations.All(r => existingDecorations.Contains(r)));
        }