compiled-bindings

Is it possible to use compiled binding (x:Bind) with Relative Source, Templated Parent

夙愿已清 提交于 2019-12-21 22:33:55
问题 I'd like to do something like this is a Style: Value="{x:Bind MyCustomDependencyProp, RelativeSource={RelativeSource TemplatedParent}}" Is that possible? Are there any performance benefits? Using TemplateBinding does not seem to work, with a custom DependencyProperty as described elsewhere here on SO: https://stackoverflow.com/a/8657453 回答1: RelativeSource (with x:Bind) is not supported, therefore this particular scenario won't be possible (at the moment, at least). Using TemplateBinding or

Is it possible to use compiled binding (x:Bind) with Relative Source, Templated Parent

佐手、 提交于 2019-12-04 17:53:08
I'd like to do something like this is a Style: Value="{x:Bind MyCustomDependencyProp, RelativeSource={RelativeSource TemplatedParent}}" Is that possible? Are there any performance benefits? Using TemplateBinding does not seem to work, with a custom DependencyProperty as described elsewhere here on SO: https://stackoverflow.com/a/8657453 RelativeSource (with x:Bind) is not supported, therefore this particular scenario won't be possible (at the moment, at least). Using TemplateBinding or standard Binding to TemplatedParent (as you mentioned) are workarounds. TemplateBinding is already an