【发布时间】:2018-01-24 12:07:30
【问题描述】:
例子:
<DataTemplate x:DataType="FooEntity">
<Grid Background="{x:Bind MyClass.MyStaticBindingMethod(???)}" />
</DataTemplate>
传递实体的属性很容易,但我看不到传递实例本身的方法。不支持此功能吗?我可以使用名为Instance 的属性(例如)在FooEntity 中存储对this 的引用,然后转到MyClass.MyStaticBindingMethod(Instance),但只是想确保没有更清洁的方法。
相关文档:https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/x-bind-markup-extension
【问题讨论】: