public CollapsedVisualTextLine(IEnumerable<SimpleTextSource> textSourcesToCollapse, SimpleTextSource precedingSource, SimpleTextSource followingSource, int index, string collapseRepresentation) {
     collapsedContent = new List<string>(textSourcesToCollapse.Select(source => source.Text));
     textBeforeCollapse = precedingSource.Text;
     textAfterCollapse = followingSource.Text;
     Index = index;
     this.collapseRepresentation = collapseRepresentation;
 }
Exemplo n.º 2
0
        public static VisualTextLine Create(IEnumerable<string> linesToCollapse, string precedingText, string followingText, int index, string collapseRepresentation) {
            var textSourceBeforeCollapse = new SimpleTextSource(precedingText, TextConfiguration.GetGlobalTextRunProperties());
            var textSourceAfterCollapse = new SimpleTextSource(followingText, TextConfiguration.GetGlobalTextRunProperties());

            return new CollapsedVisualTextLine(
                linesToCollapse.Select(line => new SimpleTextSource(line, TextConfiguration.GetGlobalTextRunProperties())), textSourceBeforeCollapse, textSourceAfterCollapse, index, collapseRepresentation);
        }
Exemplo n.º 3
0
 static VisualElement() {
     Symbol = GetSymbol();
     runProperties = TextConfiguration.GetGlobalTextRunProperties(); 
     textSource = new SimpleTextSource(Symbol, runProperties);
     charSize = TextConfiguration.GetCharSize();
 }
 public SingleVisualTextLine(SimpleTextSource textSource, int index) {
     this.textSource = textSource;
     Index = index;
 }