Data binding in WPF

Source: Internet
Author: User

Directory

Data Binding Details

Create a simple binding

Binding mode

Time of binding

Binding to XML

Object Bindings and DataTemplates

Sort the data

Welcome to trial and feedback

So far, many people know that using windows®presentation Foundation (WPF) makes it easy to design a powerful user interface. But you may not know that it also provides powerful data-binding capabilities. With WPF, you can manipulate data by using a combination of Microsoft®.net Framework code, XAML, or both. You can bind controls, public properties, XML, or objects to make data binding faster, more flexible, and simpler than before. So, let's take a look at how to start binding a control to your selected data source.

Data Binding Details

To use the WPF data binding feature, you must always have goals and sources. The target of a binding can be any accessible property or element derived from DependencyProperty, such as the Text property of a TextBox control. The source of the binding can be any public property, including other controls, common language runtime (CLR) objects, XAML elements, ado.net datasets, XML fragments, and so on. To help you implement bindings correctly, WPF contains two special providers: XmlDataProvider and ObjectDataProvider.

Now let's look at how WPF data-binding technology works, and I'll enumerate a few useful examples to illustrate their use.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.