How to define TextBox input restrictions?
I’ve done this in the past with an attached behavior, which can be used like this: <TextBox b:Masking.Mask=”^\p{Lu}*$”/> The attached behavior code looks like this: /// <summary> /// Provides masking behavior for any <see cref=”TextBox”/>. /// </summary> public static class Masking { private static readonly DependencyPropertyKey _maskExpressionPropertyKey = DependencyProperty.RegisterAttachedReadOnly(“MaskExpression”, typeof(Regex), typeof(Masking), new FrameworkPropertyMetadata()); /// <summary> … Read more