x:Reference can not be resolved after I re-arrange elements in XAML.
Here I present a working code. Just move the DataGrid element so it comes after the button eleme
Excerpted from MSDN(http://msdn.microsoft.com/en-us/library/ee795380.aspx).
x:Reference is a construct defined in XAML 2009. In WPF, you can use XAML 2009 features, but only for XAML that is not WPF markup-compiled. Markup-compiled XAML and the BAML form of XAML do not currently support the XAML 2009 language keywords and features.