Browse Source
Add toggle to include prompt on readonly
Added a bool property to display prompt characters when in a ReadOnly state.
- Note -
If this is wrong in some way (guidelines) please contact me.
pull/1342/head
EpicKip
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/MaskedTextBox/Implementation/MaskedTextBox.cs
|
|
@ -253,6 +253,8 @@ namespace Xceed.Wpf.Toolkit |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public bool DisplayPromptCharactersOnReadOnly { get;set; } |
|
|
|
|
|
|
|
|
private static void AllowPromptAsInputPropertyChangedCallback( object sender, DependencyPropertyChangedEventArgs e ) |
|
|
private static void AllowPromptAsInputPropertyChangedCallback( object sender, DependencyPropertyChangedEventArgs e ) |
|
|
{ |
|
|
{ |
|
|
MaskedTextBox maskedTextBox = sender as MaskedTextBox; |
|
|
MaskedTextBox maskedTextBox = sender as MaskedTextBox; |
|
|
@ -1915,7 +1917,7 @@ namespace Xceed.Wpf.Toolkit |
|
|
//System.Diagnostics.Debug.Assert( provider.EditPositionCount > 0 );
|
|
|
//System.Diagnostics.Debug.Assert( provider.EditPositionCount > 0 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool includePrompt = ( this.IsReadOnly ) ? false : ( !this.HidePromptOnLeave || this.IsFocused ); |
|
|
bool includePrompt = ( this.IsReadOnly && !this.DisplayPromptCharactersOnReadOnly ) ? false : ( !this.HidePromptOnLeave || this.IsFocused ); |
|
|
|
|
|
|
|
|
string displayString = provider.ToString( false, includePrompt, true, 0, m_maskedTextProvider.Length ); |
|
|
string displayString = provider.ToString( false, includePrompt, true, 0, m_maskedTextProvider.Length ); |
|
|
|
|
|
|
|
|
|