Export (0) Print
Expand All

MaskedTextProvider.ResetOnPrompt Property

Gets or sets a value that determines how an input character that matches the prompt character should be handled.

Namespace: System.ComponentModel
Assembly: System (in system.dll)

public bool ResetOnPrompt { get; set; }
/** @property */
public boolean get_ResetOnPrompt ()

/** @property */
public void set_ResetOnPrompt (boolean value)

public function get ResetOnPrompt () : boolean

public function set ResetOnPrompt (value : boolean)

Not applicable.

Property Value

true if the prompt character entered as input causes the current editable position in the mask to be reset; otherwise, false to indicate that the prompt character is to be processed as a normal input character. The default is true.

MaskedTextProvider can treat two categories of characters, paces and prompt characters, in a special manner. Normally, each input character will be tested against the mask and either accepted or rejected. Operating on the assumption that the PromptChar property is set to a value other than a null reference (Nothing in Visual Basic), then setting the ResetOnPrompt property to true will result in special processing for the prompt character. When a prompt character is added, it causes the current mask character position to be cleared and the current position to be advanced to the next editable character.

ResetOnPrompt takes precedence over the AllowPromptAsInput property as described in the following table.



Resulting behavior



The prompt character can be added and it causes the current mask position to be reset. The default.



The prompt character can be added and it causes the current mask position to be reset.



The prompt character is processed as a normal input character.



The prompt character is not valid and methods attempting to add the character will fail.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

© 2015 Microsoft