When I put a DataTemplate
in a <Page.Resources>
section, it inherits the DataContext
of the Page
when editing bindings inside the designer. However at run-time the DataTemplate
is being used by an element inside the Page
which has its own DataContext
. I want the designer to show the inner DataContext
while binding instead.
Is there a tag like d:DataContext
for DataTemplates
? Setting DataType
doesn't do anything.