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