Data Binding – How do I handle …

RelativeSource = self, ElementName=…

  • x:Bind uses page/user control as the context, so can use the element Name

RelativeSource = TemplatedParent

  • x:Bind is not supported in a control template
  • Most Scenarios should use TemplateBinding instead which is already optimized

Source / DataContext

  • Binding context for {x:Bind} is fixed, and can’t be changed for Sub elements unless it’s a template
  • Options:
    • Use a longer path to get the data
    • Add a field/property to page and bind to that