As MSDN say:
Optionally, a period (.) path can be used to bind to the current source. For example, Text="{Binding}" is equivalent to Text="{Binding Path=.}".
But in two example below i faced with different behavior:
First:
<StackPanel>
<TextBox Text="{Binding Path=MyString, UpdateSourceTrigger=PropertyChanged}"/>
<Grid DataContext="{Binding Path=MyString}">
<TextBox Text="{Binding}"></TextBox>
</Grid>
</StackPanel>
this example raise exception with message:
"Two-way binding requires Path or XPath."
Second:
<StackPanel>
<TextBox Text="{Binding Path=MyString, UpdateSourceTrigger=PropertyChanged}"/>
<Grid DataContext="{Binding Path=MyString}">
<TextBox Text="{Binding Path=.}"></TextBox>
</Grid>
</StackPanel>
And this example run properly and first TextBox text change reflected to viewmodel and text of first TextBox changed too but when second TextBox text changed that not reflected to viewmodel(or first TextBox)!
Question: I appreciate any one explain this two scenario?
Notice: DataContext of parent control(like window) is a simple class with a Notifiable property MyString:
Thanks.