高级XAML数据绑定教程 [英] Tutorial on advanced XAML databinding

查看:85
本文介绍了高级XAML数据绑定教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以推荐一个很好的教程或视频来解释更高级的XAML数据绑定语法?我理解并使用我的View和ViewModel类之间的简单绑定,例如:

  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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆