WPF multibinding A problem where binding is not valid after assigning a value to a data target

Source: Internet
Author: User

Recently, the use of WPF made an IP control test, IP values through the textbox input (also can be customized 0-254 input), requires 4 textbox multiplexing to System.Net.IPAddress, such as the first 4 textbox as numerical input, The first 4 textbox is changed by multiple binding to IPAddress, the last textbox bound IPAddress, and a function ipaddresschangedcallback is raised when a dependency property ipaddressproperty changes.

The IPAddress of the first 4 textbox is a data source with a textbox and a data target

The binding of the latter textbox is IPAddress as a data source

The results are as follows:

1, change the first 4 textbox any value will cause the last textbox changes.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/net/

2. Changing the last TextBox also results in a corresponding change to the first 4 textbox.

3, once the value of the last TextBox is changed, that is, the IPAddress is changed, then the binding of the first 4 textbox is invalid, that is, the IPAddress cannot be changed.

4, the active setting of IPAddress in the program will also cause the multipath binding is invalid, the decision method for the multi-channel binding conversion function does not execute.

Summary: When you change a data target in a multilink binding, it causes the multipath binding to be invalid. The specific reason is not clear, please the guidance of Daniel.

Code: http://download.csdn.net/detail/chifuqi/6039159

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.