C# 클래스 WinRTXamlToolkit.Controls.Extensions.FieldValidationExtensions

Attached properties for handling basic validation of field values.
파일 보기 프로젝트 열기: xyzzer/WinRTXamlToolkit 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DefaultErrorMessageProperty Windows.UI.Xaml.DependencyProperty
FormatProperty Windows.UI.Xaml.DependencyProperty
FormatValidationHandlerProperty Windows.UI.Xaml.DependencyProperty
InvalidBrushProperty Windows.UI.Xaml.DependencyProperty
IsValidProperty Windows.UI.Xaml.DependencyProperty
MinLengthErrorMessageProperty Windows.UI.Xaml.DependencyProperty
MinLengthProperty Windows.UI.Xaml.DependencyProperty
NonEmptyErrorMessageProperty Windows.UI.Xaml.DependencyProperty
NumericErrorMessageProperty Windows.UI.Xaml.DependencyProperty
PatternErrorMessageProperty Windows.UI.Xaml.DependencyProperty
PatternProperty Windows.UI.Xaml.DependencyProperty
SpecificLengthErrorMessageProperty Windows.UI.Xaml.DependencyProperty
ValidBrushProperty Windows.UI.Xaml.DependencyProperty
ValidationMessageProperty Windows.UI.Xaml.DependencyProperty
ValidationMessageVisibilityProperty Windows.UI.Xaml.DependencyProperty

공개 메소드들

메소드 설명
GetDefaultErrorMessage ( DependencyObject d ) : string

Gets the DefaultErrorMessage property. This dependency property indicates the field value is invalid.

GetFormat ( DependencyObject d ) : ValidationChecks

Gets the Format property. This dependency property indicates the formats to validate for.

GetInvalidBrush ( DependencyObject d ) : Brush

Gets the InvalidBrush property. This dependency property indicates the brush to use to highlight a field with invalid value.

GetIsValid ( DependencyObject d ) : bool

Gets the IsValid property. This dependency property indicates whether the field value is valid.

GetMinLength ( DependencyObject d ) : int

Gets the MinLength property. This dependency property indicates minimum expected field value length if MinLength format is set.

The default value is 8 which matches a typical requirement for minimum password length. Specify another value if 8 is not the minimum value you expect when you set ValidationChecks.MinLength.

GetMinLengthErrorMessage ( DependencyObject d ) : string

Gets the MinLengthErrorMessage property. This dependency property indicates the error message to use for field that doesn't match minimum length requirement.

GetNonEmptyErrorMessage ( DependencyObject d ) : string

Gets the NonEmptyErrorMessage property. This dependency property indicates the error message to use when the field is marked non-empty and is empty.

GetNumericErrorMessage ( DependencyObject d ) : string

Gets the NumericErrorMessage property. This dependency property indicates the error message to use for a field marked numeric with non-numeric content.

GetPattern ( DependencyObject d ) : string

Gets the Pattern property. This dependency property indicates the regex pattern that the Text property needs to match.

GetPatternErrorMessage ( DependencyObject d ) : string

Gets the PatternErrorMessage property. This dependency property indicates the error message to use when the field text doesn't match requested pattern.

GetSpecificLengthErrorMessage ( DependencyObject d ) : string

Gets the SpecificLengthErrorMessage property. This dependency property indicates the error message to use for a field with an incorrect number of characters.

GetValidBrush ( DependencyObject d ) : Brush

Gets the ValidBrush property. This dependency property indicates the brush to use to highlight a successfully validated field.

GetValidationMessage ( DependencyObject d ) : string

Gets the ValidationMessage property. This dependency property indicates the validation error message if the value is not valid.

GetValidationMessageVisibility ( DependencyObject d ) : Visibility

Gets the ValidationMessageVisibility property. This dependency property indicates the visibility of the validation message.

SetDefaultErrorMessage ( DependencyObject d, string value ) : void

Sets the DefaultErrorMessage property. This dependency property indicates the field value is invalid.

SetFormat ( DependencyObject d, ValidationChecks value ) : void

Sets the Format property. This dependency property indicates the formats to validate for.

SetInvalidBrush ( DependencyObject d, Brush value ) : void

Sets the InvalidBrush property. This dependency property indicates the brush to use to highlight a field with invalid value.

SetIsValid ( DependencyObject d, bool value ) : void

Sets the IsValid property. This dependency property indicates whether the field value is valid.

SetMinLength ( DependencyObject d, int value ) : void

Sets the MinLength property. This dependency property indicates minimum expected field value length if MinLength format is set.

SetMinLengthErrorMessage ( DependencyObject d, string value ) : void

Sets the MinLengthErrorMessage property. This dependency property indicates the error message to use for field that doesn't match minimum length requirement.

SetNonEmptyErrorMessage ( DependencyObject d, string value ) : void

Sets the NonEmptyErrorMessage property. This dependency property indicates the error message to use when the field is marked non-empty and is empty.

SetNumericErrorMessage ( DependencyObject d, string value ) : void

Sets the NumericErrorMessage property. This dependency property indicates the error message to use for a field marked numeric with non-numeric content.

SetPattern ( DependencyObject d, string value ) : void

Sets the Pattern property. This dependency property indicates the regex pattern that the Text property needs to match.

SetPatternErrorMessage ( DependencyObject d, string value ) : void

Sets the PatternErrorMessage property. This dependency property indicates the error message to use when the field text doesn't match requested pattern.

SetSpecificLengthErrorMessage ( DependencyObject d, string value ) : void

Sets the SpecificLengthErrorMessage property. This dependency property indicates the error message to use for a field with an incorrect number of characters.

SetValidBrush ( DependencyObject d, Brush value ) : void

Sets the ValidBrush property. This dependency property indicates the brush to use to highlight a successfully validated field.

SetValidationMessage ( DependencyObject d, string value ) : void

Sets the ValidationMessage property. This dependency property indicates the validation error message if the value is not valid.

SetValidationMessageVisibility ( DependencyObject d, Visibility value ) : void

Sets the ValidationMessageVisibility property. This dependency property indicates the visibility of the validation message.

비공개 메소드들

메소드 설명
GetFormatValidationHandler ( DependencyObject d ) : object
OnDefaultErrorMessageChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the DefaultErrorMessage property.

OnFormatChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the Format property.

OnFormatValidationHandlerChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the FormatValidationHandler property.

OnInvalidBrushChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the InvalidBrush property.

OnMinLengthChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the MinLength property.

OnMinLengthErrorMessageChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the MinLengthErrorMessage property.

OnNonEmptyErrorMessageChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the NonEmptyErrorMessage property.

OnNumericErrorMessageChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the NumericErrorMessage property.

OnPatternChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the Pattern property.

OnPatternErrorMessageChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the PatternErrorMessage property.

OnSpecificLengthErrorMessageChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the SpecificLengthErrorMessage property.

OnValidBrushChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the ValidBrush property.

SetFormatValidationHandler ( DependencyObject d, object value ) : void
SetupAndValidate ( DependencyObject dependencyObject ) : void

메소드 상세

GetDefaultErrorMessage() 공개 정적인 메소드

Gets the DefaultErrorMessage property. This dependency property indicates the field value is invalid.
public static GetDefaultErrorMessage ( DependencyObject d ) : string
d Windows.UI.Xaml.DependencyObject
리턴 string

GetFormat() 공개 정적인 메소드

Gets the Format property. This dependency property indicates the formats to validate for.
public static GetFormat ( DependencyObject d ) : ValidationChecks
d Windows.UI.Xaml.DependencyObject
리턴 ValidationChecks

GetInvalidBrush() 공개 정적인 메소드

Gets the InvalidBrush property. This dependency property indicates the brush to use to highlight a field with invalid value.
public static GetInvalidBrush ( DependencyObject d ) : Brush
d Windows.UI.Xaml.DependencyObject
리턴 Windows.UI.Xaml.Media.Brush

GetIsValid() 공개 정적인 메소드

Gets the IsValid property. This dependency property indicates whether the field value is valid.
public static GetIsValid ( DependencyObject d ) : bool
d Windows.UI.Xaml.DependencyObject
리턴 bool

GetMinLength() 공개 정적인 메소드

Gets the MinLength property. This dependency property indicates minimum expected field value length if MinLength format is set.
The default value is 8 which matches a typical requirement for minimum password length. Specify another value if 8 is not the minimum value you expect when you set ValidationChecks.MinLength.
public static GetMinLength ( DependencyObject d ) : int
d Windows.UI.Xaml.DependencyObject
리턴 int

GetMinLengthErrorMessage() 공개 정적인 메소드

Gets the MinLengthErrorMessage property. This dependency property indicates the error message to use for field that doesn't match minimum length requirement.
public static GetMinLengthErrorMessage ( DependencyObject d ) : string
d Windows.UI.Xaml.DependencyObject
리턴 string

GetNonEmptyErrorMessage() 공개 정적인 메소드

Gets the NonEmptyErrorMessage property. This dependency property indicates the error message to use when the field is marked non-empty and is empty.
public static GetNonEmptyErrorMessage ( DependencyObject d ) : string
d Windows.UI.Xaml.DependencyObject
리턴 string

GetNumericErrorMessage() 공개 정적인 메소드

Gets the NumericErrorMessage property. This dependency property indicates the error message to use for a field marked numeric with non-numeric content.
public static GetNumericErrorMessage ( DependencyObject d ) : string
d Windows.UI.Xaml.DependencyObject
리턴 string

GetPattern() 공개 정적인 메소드

Gets the Pattern property. This dependency property indicates the regex pattern that the Text property needs to match.
public static GetPattern ( DependencyObject d ) : string
d Windows.UI.Xaml.DependencyObject
리턴 string

GetPatternErrorMessage() 공개 정적인 메소드

Gets the PatternErrorMessage property. This dependency property indicates the error message to use when the field text doesn't match requested pattern.
public static GetPatternErrorMessage ( DependencyObject d ) : string
d Windows.UI.Xaml.DependencyObject
리턴 string

GetSpecificLengthErrorMessage() 공개 정적인 메소드

Gets the SpecificLengthErrorMessage property. This dependency property indicates the error message to use for a field with an incorrect number of characters.
public static GetSpecificLengthErrorMessage ( DependencyObject d ) : string
d Windows.UI.Xaml.DependencyObject
리턴 string

GetValidBrush() 공개 정적인 메소드

Gets the ValidBrush property. This dependency property indicates the brush to use to highlight a successfully validated field.
public static GetValidBrush ( DependencyObject d ) : Brush
d Windows.UI.Xaml.DependencyObject
리턴 Windows.UI.Xaml.Media.Brush

GetValidationMessage() 공개 정적인 메소드

Gets the ValidationMessage property. This dependency property indicates the validation error message if the value is not valid.
public static GetValidationMessage ( DependencyObject d ) : string
d Windows.UI.Xaml.DependencyObject
리턴 string

GetValidationMessageVisibility() 공개 정적인 메소드

Gets the ValidationMessageVisibility property. This dependency property indicates the visibility of the validation message.
public static GetValidationMessageVisibility ( DependencyObject d ) : Visibility
d Windows.UI.Xaml.DependencyObject
리턴 Visibility

SetDefaultErrorMessage() 공개 정적인 메소드

Sets the DefaultErrorMessage property. This dependency property indicates the field value is invalid.
public static SetDefaultErrorMessage ( DependencyObject d, string value ) : void
d Windows.UI.Xaml.DependencyObject
value string
리턴 void

SetFormat() 공개 정적인 메소드

Sets the Format property. This dependency property indicates the formats to validate for.
public static SetFormat ( DependencyObject d, ValidationChecks value ) : void
d Windows.UI.Xaml.DependencyObject
value ValidationChecks
리턴 void

SetInvalidBrush() 공개 정적인 메소드

Sets the InvalidBrush property. This dependency property indicates the brush to use to highlight a field with invalid value.
public static SetInvalidBrush ( DependencyObject d, Brush value ) : void
d Windows.UI.Xaml.DependencyObject
value Windows.UI.Xaml.Media.Brush
리턴 void

SetIsValid() 공개 정적인 메소드

Sets the IsValid property. This dependency property indicates whether the field value is valid.
public static SetIsValid ( DependencyObject d, bool value ) : void
d Windows.UI.Xaml.DependencyObject
value bool
리턴 void

SetMinLength() 공개 정적인 메소드

Sets the MinLength property. This dependency property indicates minimum expected field value length if MinLength format is set.
public static SetMinLength ( DependencyObject d, int value ) : void
d Windows.UI.Xaml.DependencyObject
value int
리턴 void

SetMinLengthErrorMessage() 공개 정적인 메소드

Sets the MinLengthErrorMessage property. This dependency property indicates the error message to use for field that doesn't match minimum length requirement.
public static SetMinLengthErrorMessage ( DependencyObject d, string value ) : void
d Windows.UI.Xaml.DependencyObject
value string
리턴 void

SetNonEmptyErrorMessage() 공개 정적인 메소드

Sets the NonEmptyErrorMessage property. This dependency property indicates the error message to use when the field is marked non-empty and is empty.
public static SetNonEmptyErrorMessage ( DependencyObject d, string value ) : void
d Windows.UI.Xaml.DependencyObject
value string
리턴 void

SetNumericErrorMessage() 공개 정적인 메소드

Sets the NumericErrorMessage property. This dependency property indicates the error message to use for a field marked numeric with non-numeric content.
public static SetNumericErrorMessage ( DependencyObject d, string value ) : void
d Windows.UI.Xaml.DependencyObject
value string
리턴 void

SetPattern() 공개 정적인 메소드

Sets the Pattern property. This dependency property indicates the regex pattern that the Text property needs to match.
public static SetPattern ( DependencyObject d, string value ) : void
d Windows.UI.Xaml.DependencyObject
value string
리턴 void

SetPatternErrorMessage() 공개 정적인 메소드

Sets the PatternErrorMessage property. This dependency property indicates the error message to use when the field text doesn't match requested pattern.
public static SetPatternErrorMessage ( DependencyObject d, string value ) : void
d Windows.UI.Xaml.DependencyObject
value string
리턴 void

SetSpecificLengthErrorMessage() 공개 정적인 메소드

Sets the SpecificLengthErrorMessage property. This dependency property indicates the error message to use for a field with an incorrect number of characters.
public static SetSpecificLengthErrorMessage ( DependencyObject d, string value ) : void
d Windows.UI.Xaml.DependencyObject
value string
리턴 void

SetValidBrush() 공개 정적인 메소드

Sets the ValidBrush property. This dependency property indicates the brush to use to highlight a successfully validated field.
public static SetValidBrush ( DependencyObject d, Brush value ) : void
d Windows.UI.Xaml.DependencyObject
value Windows.UI.Xaml.Media.Brush
리턴 void

SetValidationMessage() 공개 정적인 메소드

Sets the ValidationMessage property. This dependency property indicates the validation error message if the value is not valid.
public static SetValidationMessage ( DependencyObject d, string value ) : void
d Windows.UI.Xaml.DependencyObject
value string
리턴 void

SetValidationMessageVisibility() 공개 정적인 메소드

Sets the ValidationMessageVisibility property. This dependency property indicates the visibility of the validation message.
public static SetValidationMessageVisibility ( DependencyObject d, Visibility value ) : void
d Windows.UI.Xaml.DependencyObject
value Visibility
리턴 void

프로퍼티 상세

DefaultErrorMessageProperty 공개적으로 정적으로 프로퍼티

DefaultErrorMessage Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml DefaultErrorMessageProperty
리턴 Windows.UI.Xaml.DependencyProperty

FormatProperty 공개적으로 정적으로 프로퍼티

Format Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml FormatProperty
리턴 Windows.UI.Xaml.DependencyProperty

FormatValidationHandlerProperty 공개적으로 정적으로 프로퍼티

FormatValidationHandler Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml FormatValidationHandlerProperty
리턴 Windows.UI.Xaml.DependencyProperty

InvalidBrushProperty 공개적으로 정적으로 프로퍼티

InvalidBrush Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml InvalidBrushProperty
리턴 Windows.UI.Xaml.DependencyProperty

IsValidProperty 공개적으로 정적으로 프로퍼티

IsValid Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml IsValidProperty
리턴 Windows.UI.Xaml.DependencyProperty

MinLengthErrorMessageProperty 공개적으로 정적으로 프로퍼티

MinLengthErrorMessage Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml MinLengthErrorMessageProperty
리턴 Windows.UI.Xaml.DependencyProperty

MinLengthProperty 공개적으로 정적으로 프로퍼티

MinLength Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml MinLengthProperty
리턴 Windows.UI.Xaml.DependencyProperty

NonEmptyErrorMessageProperty 공개적으로 정적으로 프로퍼티

NonEmptyErrorMessage Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml NonEmptyErrorMessageProperty
리턴 Windows.UI.Xaml.DependencyProperty

NumericErrorMessageProperty 공개적으로 정적으로 프로퍼티

NumericErrorMessage Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml NumericErrorMessageProperty
리턴 Windows.UI.Xaml.DependencyProperty

PatternErrorMessageProperty 공개적으로 정적으로 프로퍼티

PatternErrorMessage Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml PatternErrorMessageProperty
리턴 Windows.UI.Xaml.DependencyProperty

PatternProperty 공개적으로 정적으로 프로퍼티

Pattern Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml PatternProperty
리턴 Windows.UI.Xaml.DependencyProperty

SpecificLengthErrorMessageProperty 공개적으로 정적으로 프로퍼티

SpecificLengthErrorMessage Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml SpecificLengthErrorMessageProperty
리턴 Windows.UI.Xaml.DependencyProperty

ValidBrushProperty 공개적으로 정적으로 프로퍼티

ValidBrush Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml ValidBrushProperty
리턴 Windows.UI.Xaml.DependencyProperty

ValidationMessageProperty 공개적으로 정적으로 프로퍼티

ValidationMessage Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml ValidationMessageProperty
리턴 Windows.UI.Xaml.DependencyProperty

ValidationMessageVisibilityProperty 공개적으로 정적으로 프로퍼티

ValidationMessageVisibility Attached Dependency Property
public static DependencyProperty,Windows.UI.Xaml ValidationMessageVisibilityProperty
리턴 Windows.UI.Xaml.DependencyProperty