Click here to Skip to main content
12,895,911 members (51,628 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 28 Dec 2010

Custom WPF TextBox Style

, 28 Dec 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
TextBox Style which resembles the Twitter's text field.
Download TwitterTextBox for WPF Demo and Source Code

View Image


This tip was written to demonstrate how to customize the rendering of the standard TextBox control provided by Microsoft. You can use this custom style to achieve the Twitter's TextBox look and feel.

Using the Style

To make use of the custom Style you need to set the Style property of your TextBox controls.

The example code below demonstrates how to apply the style:

<TextBox Style="{StaticResource TwitterTextBoxStyle}" Height="25" Name="textBox1" Width="300" />

Points of Interest

I have made this TextBox Style as part of my university project. I wanted to add to my application some cool glow effects and animations.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralReason for my vote of 1 not helpful Pin
st0rmrd17-Aug-11 1:36
memberst0rmrd17-Aug-11 1:36 
GeneralThanks for the code sample, just what I needed! Pin
Riaan77721-Jul-11 0:56
memberRiaan77721-Jul-11 0:56 
GeneralThis is just a short article(tip), it should not be too long... Pin
John_Smith784-Jan-11 23:52
memberJohn_Smith784-Jan-11 23:52 
GeneralJohn i am well versed with WPF! but what about others? you s... Pin
Tarun.K.S30-Dec-10 7:38
memberTarun.K.S30-Dec-10 7:38 
GeneralThe provided Style definition extends the standard TextBox's... Pin
John_Smith7829-Dec-10 2:19
memberJohn_Smith7829-Dec-10 2:19 
GeneralReason for my vote of 2 No explanation at all! Pin
Tarun.K.S29-Dec-10 1:17
memberTarun.K.S29-Dec-10 1:17 
GeneralStill no explanation of what this is all about. Pin
Richard MacCutchan24-Dec-10 6:27
mvpRichard MacCutchan24-Dec-10 6:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170424.1 | Last Updated 28 Dec 2010
Article Copyright 2010 by John_Smith78
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid