C# Class PaulStovell.TrialBalance.UserInterface.Validation.TextBoxErrorDisplayStrategy

An error displayer designed to display error messages on text boxes.
Inheritance: IErrorDisplayStrategy
显示文件 Open project: PaulStovell/trial-balance

Private Properties

Property Type Description

Public Methods

Method Description
CanDisplayForElement ( FrameworkElement element ) : bool

Indicates whether we can display error messages for a given element.

ClearError ( FrameworkElement element ) : void

Clears any error messages on an element.

DisplayError ( FrameworkElement element, string errorMessage ) : void

Displays the error message on a given element.

TextBoxErrorDisplayStrategy ( ) : System

Constructor.

Method Details

CanDisplayForElement() public method

Indicates whether we can display error messages for a given element.
public CanDisplayForElement ( FrameworkElement element ) : bool
element System.Windows.FrameworkElement The element that needs to be validated.
return bool

ClearError() public method

Clears any error messages on an element.
public ClearError ( FrameworkElement element ) : void
element System.Windows.FrameworkElement The element to clear any error messages for.
return void

DisplayError() public method

Displays the error message on a given element.
public DisplayError ( FrameworkElement element, string errorMessage ) : void
element System.Windows.FrameworkElement The element to display the error on.
errorMessage string The error message to display.
return void

TextBoxErrorDisplayStrategy() public method

Constructor.
public TextBoxErrorDisplayStrategy ( ) : System
return System