Table of Contents

Class FindingMessage

Namespace
The.WPF.Fields
Assembly
Instagile.WPF.dll

Findings reach the UI through WPF binding validation, whose error content is a bare string. A level prefix carries the finding's MessageLevel alongside its text: ErrorBorder reads the prefix back to colour its border, and the tooltip strips it. Errors are unprefixed, so any message which does not open with a known prefix reads as an error.

public static class FindingMessage
Inheritance
FindingMessage
Inherited Members

Methods

Decode(string?)

The text of message, without its level prefix.

public static string Decode(string? message)

Parameters

message string

Returns

string

Encode(MessageLevel, string)

Prefixes message so LevelOf(string?) can recover level.

public static string Encode(MessageLevel level, string message)

Parameters

level MessageLevel
message string

Returns

string

LevelOf(IEnumerable<ValidationError>)

The most severe level among a control's binding validation errors. Content from any other source - a conversion failure, an application rule - carries no prefix and so reads as Error.

public static MessageLevel LevelOf(IEnumerable<ValidationError> errors)

Parameters

errors IEnumerable<ValidationError>

Returns

MessageLevel

LevelOf(string?)

The level message was encoded with, or Error.

public static MessageLevel LevelOf(string? message)

Parameters

message string

Returns

MessageLevel