This property is used when you are making use of Binding in your application. You are using Binding, that is seen. But you didn't get it perhaps. So, this sets up how does Binding works. Binding is a two-way process, in these two way processes you can surely select where to bind your data.
1. Two-way: Data is synchronized both way.
2. One-way (from source): In this method, the data once edited is lost unless you save it somewhere else.
3. One-way (from control): Data is not accessed, but what user writes is stored in the source.
But, you didn't make use of
that property[
^] at all. Did you?
Now the
answer to your question, if you enter "
ABCDEFG" only, "
D" will be presented. Why? Have a look at your code,
Text="{Binding Path=Text[3],ElementName=txt1,Mode=OneWay}"
You are using
Text[3]
, string is an array of characters so it would return the 4th element in array (
are you aware of string.Length
and string[index]
?). That is why, it would always write the 4th element. Change that Path value to get a different value. :-)
The default value for this property is
PropertyChanged
. Which would trigger when a property for that control would change, you are interested in Text property. So it would not (never!) wait until you press Tab. It would simply write the character at 4th location (index 3) when there is a valid character at that location. That is why your application also does not wait for you to press Tab.