Hi,
Can i block unwanted characters in my XamTextEditor thru xaml ??
Sandeep
:(
Still not working..
Anything else to do. any other property to be set ??
i pasted the very same code, but no change..
Sandeep,
I am actually using an array of strings.
string[] chars = new string[3];
chars[0] = "a";
chars[1] = "b";
chars[2] = "c";
xamTextEditor1.ValueConstraint.Enumeration = chars;
It is also working with:
List<string> chars1 = new List<string>();
chars1.Add("a");
chars1.Add("b");
chars1.Add("c");
Please not that the value of the Editor has to match one of the strings in the collection.
For example : input: a - > correct
input: aa -> incorrect
Alex.
Hi Alex,
Thanks for the response. Tried what u said. But it didnt work.
this is what i did.
IList<String> blockedChars = new List<String>();
blockedChars.Add("'");
xamTextEditor1.ValueConstraint.Enumeration = blockedChars;
Anything missing?
Hello Sandeep,
Yes, you can use the ValueConstraint.Enumeration property, which requires an IEnumerable collection of values that can be validated by the ValueConstraint object. In other words the value being validated by this ValueConstraint object will not be considered valid if the value is not part of this enumeration.
Hope this helps,Alex.