简体   繁体   English

如何从app.xaml更改文本框xaml上的背景颜色

[英]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 . 现在,我想更改textboxbackground-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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM