コード例 #1
0
ファイル: RichTextAreaHandler.cs プロジェクト: zzlvff/Eto
        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)));
        }