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