DefaultValueDisplay<T>

public sealed class DefaultValueDisplay<T> : IValueDisplay
Gets the default display proxy for data. The default display assumes the existence of a primary and optional secondary textual description of a value.
T

Constructors

DefaultValueDisplay

#
Create a new proxy with custom texts.
public DefaultValueDisplay(
Pear<T>
pear,
description
)

DefaultValueDisplay

#
Create a new proxy with custom texts.
public DefaultValueDisplay(
Pear<T>
pear,
primary,
secondary = null
)

DefaultValueDisplay

#
Create a new proxy from a value pear.
public DefaultValueDisplay(
Pear<T>
pear
)

Properties

Description

#
Primary text to display (big and opaque).
public LazyStrings Description { get; }

Height

#
Gets the ideal vertical height for this proxy. There is no guarantee this hint will be obeyed, when proxies are part of a table, the highest element in each row will set the height of all elements.
public DisplayHeight Height { get; }
Height

Value

#
Value this proxy wraps around.
public Pear<T> Value { get; }

Methods

AddDetail

#
Register a detailed description for a fragment of the primary description. The fragment must occur verbatim in the primary string at the given index, otherwise the detail is ignored. To describe the entire value, register the whole primary string as the fragment.
public void AddDetail(
start,
Index of the first fragment character within the primary description.
fragment,
Fragment of the primary description which is described in more detail.
detail
Detailed description.
)
Explicit

IValueDisplay.Draw

#
void IValueDisplay.Draw(
context,
Font
font,
Color
background,
frame
)
Draw