What is the meaning of path in C#WPF Binding?

Source: Internet
Author: User

<x:name= "txt1"/><x:name= "Txt2 "  Text="{Binding path=text, elementname=txt1}"
The binding is a TextBox ( control type ) control named Txt1, but the TextBlock to display is of course not the type of control, so you need an indicator to specify what to display again,path is useful, and here it says The text value of the TextBox type control, that is, the value displayed in Txt1. 
"  {Binding path=text, elementname=txt1}"   Indicates the value of text in the TXT1.
<  x:name = "txt2" Text = "{Binding path=text, ELEMENTNAME=TXT1}"
If Txt1. Text is "This is Txt1", txt2 because its text bound Txt1.text property, so Txt2.text is also shown "This is Txt1", and if txt1. The value of text changes,txt2. The value of text also changes. 

What does the path in the C#WPF Binding mean

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.