Search code examples
uwp-xamlwinuiwinui-3

How to get bound property path for {x:Bind}


Using WPF I was able to get the path of a {Binding} bound property through the BindingExpression. In UWP is there a way to determine which property is bound using the {x:Bind} syntax? I need to discover which properties are bound to which controls. I Understand that there is no BindingExpression with {x:Bind}. Is there another way to map between a control and it's bound property?


Solution

  • {x:Bind} extension is directive executed at design time to generate code to register event handlers and explicitly set the relevant properties, bypassing the {Binding} registration that uses reflection at runtime, so at runtime there is no way to detect or get a handler to the binding statement from an {x:Bind} because there is none.