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