开发者

setting a property of a control using a property of other control in WPF

开发者 https://www.devze.com 2023-02-11 00:15 出处:网络
I have a border inside that I have a text box. I want to set a pr开发者_StackOverflow中文版operty of border based on the property of textbox. I want to accomplish this without using ElementName..

I have a border inside that I have a text box.

I want to set a pr开发者_StackOverflow中文版operty of border based on the property of textbox. I want to accomplish this without using ElementName... Is this possible? Please help me out.


I think using ElementName is the only way to databind the border to the TextBox's text. The other way to get the interaction it is to handle the TextChanged event. Inside the handler you can interpret the value of the TextBox and apply it to the border.

0

精彩评论

暂无评论...
验证码 换一张
取 消