示例#1
0
        private static string ContainerStyleToString(ContainerElementStyle style)
        {
            var stringValue = style.ToString();

            return(string.Join(
                       " Or ",
                       stringValue
                       .Split(new[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries)
                       .Select(value => $"{nameof(ContainerElementStyle)}.{value}")
                       ));
        }
 public TooltipElement(string label, object value, ContainerElementStyle style)
 {
     this.Label = label;
     this.Value = value;
     this.Style = style;
 }
示例#3
0
 /// <summary>
 /// Constructs a new container.
 /// </summary>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="elements"/> is <c>null</c>.</exception>
 /// <param name="style">The layout style for the container.</param>
 /// <param name="elements">The elements to translate to UI and display via the <see cref="IViewElementFactoryService"/>.</param>
 public ContainerElement(ContainerElementStyle style, params object[] elements)
 {
     this.Style    = style;
     this.Elements = elements?.ToImmutableList() ?? throw new ArgumentNullException(nameof(elements));
 }