Strongly-typed data binding means you get design-time autocomplete in the XAML tooling. How do you decorate your XAML controls and data templates so you have design-time, strongly-typed data binding?
This is how you do it:
<Page.Resources>
<DataTemplate x:Key="TestTemplate">
<TextBlock xmlns:Models="using:App17.Models"
Text="{Binding Name}"
d:DataContext="{d:DesignInstance Type=Models:ColorInfo}" />
</DataTemplate>
</Page.Resources>
Best of luck!
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句