高级XAML数据绑定教程 [英] Tutorial on advanced XAML databinding
问题描述
Text ={Binding Name}
但是有时候我会在其他教程和博客文章中看到这样的绑定,我很难追踪。 >
ToolTip ={Binding Path = AdornedElement.ToolTip,RelativeSource = {RelativeSource Mode = FindAncestor,AncestorType = {x:Type Adorner}}}
通常我可以通过复制代码来使事情工作,但我真的很想理解
有关 DataBinding
code> Joel Johnson 在上编写了一个很好的代码CodeProject
http://www.codeproject.com/Articles/29054/WPF-Data -Binding-Part-1
此外,MSDN还有一个很棒的教程
< a href =http://msdn.microsoft.com/en-us/library/ms752347.aspx =nofollow> http://msdn.microsoft.com/en-us/library/ms752347.aspx
Can someone recommend a good tutorial or video that explains the more advanced XAML data-binding syntax? I understand and use simple binding between my View and ViewModel classes such as:
Text="{Binding Name}"
But sometimes I see bindings like this on other tutorials and blog posts which I have a hard time following.
ToolTip="{Binding Path=AdornedElement.ToolTip,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type Adorner}}}"
Usually I can get things working by just copying to code, but I'd really like to understand what is going on.
For a good tutorial on DataBinding
Joel Johnson
wrote a great one on CodeProject
http://www.codeproject.com/Articles/29054/WPF-Data-Binding-Part-1
Also MSDN has a great tutorial also
http://msdn.microsoft.com/en-us/library/ms752347.aspx
这篇关于高级XAML数据绑定教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!