diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxMask/TextBoxMask.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxMask/TextBoxMask.bind
index 916f71a7ca1..f2d69fc56db 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxMask/TextBoxMask.bind
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxMask/TextBoxMask.bind
@@ -33,34 +33,34 @@
+ Text="TextBoxMask" />
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxMask/TextBoxMaskPage.xaml b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxMask/TextBoxMaskPage.xaml
index 3cff6b59f4b..148c5933b5d 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxMask/TextBoxMaskPage.xaml
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxMask/TextBoxMaskPage.xaml
@@ -11,10 +11,10 @@
+ ui:TextBoxExtensions.MaskPlaceholder=" " />
+ ui:TextBoxExtensions.MaskPlaceholder=" " />
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxRegex/TextBoxRegex.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxRegex/TextBoxRegex.bind
index 5d651fef082..fea97e83720 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxRegex/TextBoxRegex.bind
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TextBoxRegex/TextBoxRegex.bind
@@ -34,70 +34,70 @@
-
+
+ Margin="10,10,10,0">
-
+
+ Margin="10,10,10,0">
-
+
-
+
-
+
diff --git a/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/SurfaceDialOptions.cs b/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/SurfaceDialOptions.cs
index 9e0293bd147..783948f4605 100644
--- a/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/SurfaceDialOptions.cs
+++ b/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/SurfaceDialOptions.cs
@@ -5,7 +5,6 @@
using Windows.UI.Input;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Input;
namespace Microsoft.Toolkit.Uwp.UI
{
diff --git a/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/TextBoxExtensions.Mask.Internals.cs b/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/TextBoxExtensions.Mask.Internals.cs
index 1974f27aa4b..18dee56289e 100644
--- a/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/TextBoxExtensions.Mask.Internals.cs
+++ b/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/TextBoxExtensions.Mask.Internals.cs
@@ -49,7 +49,7 @@ private static void Textbox_Loaded(object sender, RoutedEventArgs e)
return;
}
- var placeHolderValue = textbox.GetValue(PlaceHolderProperty) as string;
+ var placeHolderValue = textbox.GetValue(MaskPlaceholderProperty) as string;
if (string.IsNullOrEmpty(placeHolderValue))
{
throw new ArgumentException("PlaceHolder can't be null or empty");
@@ -152,7 +152,7 @@ private static void Textbox_GotFocus_Mask(object sender, RoutedEventArgs e)
{
var textbox = (TextBox)sender;
var mask = textbox?.GetValue(MaskProperty) as string;
- var placeHolderValue = textbox?.GetValue(PlaceHolderProperty) as string;
+ var placeHolderValue = textbox?.GetValue(MaskPlaceholderProperty) as string;
var representationDictionary = textbox?.GetValue(RepresentationDictionaryProperty) as Dictionary;
if (string.IsNullOrWhiteSpace(mask) ||
representationDictionary == null ||
@@ -194,7 +194,7 @@ private static async void Textbox_Paste(object sender, TextControlPasteEventArgs
var textbox = (TextBox)sender;
var mask = textbox.GetValue(MaskProperty) as string;
var representationDictionary = textbox?.GetValue(RepresentationDictionaryProperty) as Dictionary;
- var placeHolderValue = textbox.GetValue(PlaceHolderProperty) as string;
+ var placeHolderValue = textbox.GetValue(MaskPlaceholderProperty) as string;
if (string.IsNullOrWhiteSpace(mask) ||
representationDictionary == null ||
string.IsNullOrEmpty(placeHolderValue))
@@ -262,7 +262,7 @@ private static void Textbox_TextChanging(TextBox textbox, TextBoxTextChangingEve
var escapedChars = textbox.GetValue(EscapedCharacterIndicesProperty) as List;
var representationDictionary = textbox.GetValue(RepresentationDictionaryProperty) as Dictionary;
- var placeHolderValue = textbox?.GetValue(PlaceHolderProperty) as string;
+ var placeHolderValue = textbox?.GetValue(MaskPlaceholderProperty) as string;
var oldText = textbox.GetValue(OldTextProperty) as string;
var oldSelectionStart = (int)textbox.GetValue(OldSelectionStartProperty);
var oldSelectionLength = (int)textbox.GetValue(OldSelectionLengthProperty);
diff --git a/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/TextBoxExtensions.Mask.Properties.cs b/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/TextBoxExtensions.Mask.Properties.cs
index 1388c422206..67a007c5ccf 100644
--- a/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/TextBoxExtensions.Mask.Properties.cs
+++ b/Microsoft.Toolkit.Uwp.UI/Extensions/TextBox/TextBoxExtensions.Mask.Properties.cs
@@ -19,7 +19,7 @@ public static partial class TextBoxExtensions
///
/// Represents the mask place holder which represents the variable character that the user can edit in the textbox
///
- public static readonly DependencyProperty PlaceHolderProperty = DependencyProperty.RegisterAttached("PlaceHolder", typeof(string), typeof(TextBoxExtensions), new PropertyMetadata(DefaultPlaceHolder, InitTextBoxMask));
+ public static readonly DependencyProperty MaskPlaceholderProperty = DependencyProperty.RegisterAttached("MaskPlaceholder", typeof(string), typeof(TextBoxExtensions), new PropertyMetadata(DefaultPlaceHolder, InitTextBoxMask));
///
/// Represents the custom mask that the user can create to add his own variable characters based on regex expression
@@ -60,9 +60,9 @@ public static void SetMask(TextBox obj, string value)
///
/// TextBox control
/// placeholder value
- public static string GetPlaceHolder(TextBox obj)
+ public static string GetMaskPlaceholder(TextBox obj)
{
- return (string)obj.GetValue(PlaceHolderProperty);
+ return (string)obj.GetValue(MaskPlaceholderProperty);
}
///
@@ -70,9 +70,9 @@ public static string GetPlaceHolder(TextBox obj)
///
/// TextBox Control
/// placeholder Value
- public static void SetPlaceHolder(TextBox obj, string value)
+ public static void SetMaskPlaceholder(TextBox obj, string value)
{
- obj.SetValue(PlaceHolderProperty, value);
+ obj.SetValue(MaskPlaceholderProperty, value);
}
///