【发布时间】:2018-04-12 19:37:29
【问题描述】:
这已经出现过几次了,我整天都在 UWP 应用中苦苦挣扎。
我的具体问题是我在 DataTemplate 内的 ContentTemplate 中使用 x:Bind:
<DataTemplate x:DataType="IFactionMember">
<Button Command="{x:Bind **Property of IFactionMember**}"> // Good
<Button.Template>
<ControlTemplate TargetType="Button">
<Grid Padding="10,0">
<TextBlock Text="{x:Bind **Property of IFactionMember**}" /> // Bad
</Grid>
</ControlTemplate>
</Button.Template>
</Button>
</DataTemplate>
你不能这样做:(
【问题讨论】:
标签: xaml uwp winrt-xaml