简体   繁体   中英

How do you customize a WPF TextBox control (template) appearance?

TextBox seems to work differently from others... Say you want a different font, rounded corners, different colors, a tiled image for the background, reduced padding above/below the text (when I change the font on an individual TextBox they get a little too tall but there's a lot of wasted space), etc. How do you do this in Blend 4?

I'd like it to be in App.xaml so that it's used by default for all TextBox controls in the app.

I think everything you mentioned can be done using controltemplates.What is not working ?

Check this link

http://msdn.microsoft.com/en-us/library/ms752068%28v=vs.85%29.aspx

It will get you started for sure

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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