Useful for grouping a set of inlines and optionally writing them out.
Inheritance: XInline
Esempio n. 1
0
        protected override FrameworkElement BuildElementInternal()
        {
            var buildElementInternal = new TextBlock
            {
                TextWrapping = TextWrapping.Wrap,
                Margin       = new Thickness(0, 0, 0, 5)
            };
            var buildElement = new XSpan(children.ToArray()).BuildElement();

            buildElementInternal.Inlines.Add(buildElement);
            return(buildElementInternal);
        }
Esempio n. 2
0
        protected override string ToString(bool formatted)
        {
            if (!ShouldBuildElement())
            {
                return(string.Empty);
            }

            var span         = new XSpan(children.ToArray());
            var spanToString = formatted ? span.ToString() : span.ToPlainString();

            if (BlockStyle == BlockStyle.Indented)
            {
                spanToString = Indent(spanToString);
            }

            return(spanToString + Environment.NewLine);
        }
Esempio n. 3
0
 protected bool Equals(XSpan other)
 {
     return(base.Equals(other) && ListEquals(Children, other.Children));
 }
Esempio n. 4
0
 protected bool Equals(XSpan other)
 {
     return base.Equals(other) && ListEquals(Children, other.Children);
 }
Esempio n. 5
0
 protected override FrameworkElement BuildElementInternal()
 {
     var buildElementInternal = new TextBlock
     {
         TextWrapping = TextWrapping.Wrap,
         Margin = new Thickness(0, 0, 0, 5)
     };
     var buildElement = new XSpan(children.ToArray()).BuildElement();
     buildElementInternal.Inlines.Add(buildElement);
     return buildElementInternal;
 }
Esempio n. 6
0
        protected override string ToString(bool formatted)
        {
            if (!ShouldBuildElement())
                return string.Empty;

            var span = new XSpan(children.ToArray());
            var spanToString = formatted ? span.ToString() : span.ToPlainString();
            if (BlockStyle == BlockStyle.Indented)
            {
                spanToString = Indent(spanToString);
            }

            return spanToString + Environment.NewLine;
        }