[英]How to change background color on textbox xaml from app.xaml
I have created a Windows Phone app using C# and XAML. 我已经使用C#和XAML创建了Windows Phone应用。
Now I want to change the background-color
on my textbox
if it GotFocus
. 现在,我想更改
textbox
的background-color
(如果它是GotFocus
。 How can I trigger that from app.xaml? 如何从app.xaml触发呢? I want to code once so that it can be implemented in all of my
textbox
es. 我想编写一次代码,以便可以在我的所有
textbox
都实现它。
I have tried using VisualState, but I don't know how to use it 我尝试使用VisualState,但是我不知道如何使用它
have you checked this question? 你检查过这个问题了吗? I think you have the same problem
我觉得你有同样的问题
changing background color of container when textbox is in focus 焦点对准文本框时更改容器的背景颜色
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.