Useful for grouping a set of inlines and optionally writing them out.
Inheritance: XInline
Example #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);
        }
Example #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);
        }
Example #3
0
 protected bool Equals(XSpan other)
 {
     return(base.Equals(other) && ListEquals(Children, other.Children));
 }
Example #4
0
 protected bool Equals(XSpan other)
 {
     return base.Equals(other) && ListEquals(Children, other.Children);
 }
Example #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;
 }
Example #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;
        }