Class UIElementTextAdapter
- Namespace
- Icy.Markup
- Assembly
- IcyUI.dll
public sealed class UIElementTextAdapter : IMarkupTextAdapter
- Inheritance
-
UIElementTextAdapter
- Implements
- Inherited Members
- Extension Methods
Remarks
The resulting TextBlock has no FontFamily of its own, and relies on DefaultFontFamily or FallbackFont to resolve one - configure at least one of those, or bare text renders as nothing.
Methods
Adapt(string, Type)
Produces the value to assign to a content property of targetType for
text.
public object? Adapt(string text, Type targetType)
Parameters
textstringThe element's text, already trimmed.
targetTypeTypeThe type of the content property the text is being written into.
Returns
- object
A value assignable to
targetType.
CanAdapt(Type)
Determines whether this adapter can produce a value assignable to targetType.
public bool CanAdapt(Type targetType)
Parameters
targetTypeTypeThe type of the content property the text is being written into.
Returns
- bool
true when Adapt(string, Type) can handle this type.