They're binding to two subtly different things:
"Binding DataContext.TestCommand"
is binding to the TestCommand
property of the Datacontext
(presumably the context defines that property) of your Page
.
"Binding TestCommand"
is binding to the TestCommand
property of the Page
itself, which in this case probably doesn't exist, which is why it doesn't work.
There's a neat program called WPF Snoop that you can use to inspect the bindings whilst things are running (often helps me make sense of things when I'm, stuck).