We’ve been working on an application using Silverlight 4 Beta 1 and we came across a problem when we wanted to style the new RichTextArea control. We wanted to remove the border in all instances so we could make a nice in-place edit control for rich text.
Well as it turns out this is very easy to do (see our next post for the full XAML code)… But we did have one problem – how to find the default style of the RichTextArea control since it hasn’t been documented yet and we didn’t have time to download and install Expression Blend 4 Preview (which can show the styles). We need to know the default style so we can easily copy and paste them and then customize them.
Turns out there is an easy solution at hand that involved the user of .NET Reflector, which is an awesome product by the way and if you don’t already have it in your toolbox then you should get it now.
Step 1
Open .NET Reflector, click the “open” button and open the following assembly:
%ProgramFiles%\Microsoft Silverlight\4.0.41108.0\System.Windows.dll
Step 2
Expand the System.Windows item in the tree the expand the Resources folder and finally select the System.Windows.g.resources item. In the right-hand window you should see an entry called themes/generic.xaml.
Step 3
Right-click themes/generic.xaml and in the popup menu select Save As and save the generic.xaml file to your desktop. Then simply drag-and-drop generic.xaml into Visual Studio or any other XML viewer to get access to all the control’s styles which are in this file (including RichTextArea etc).
That’s all there is to it – Silverlight stores all the default styles for controls in this generic.xaml file so it’s a great time saver knowing where to find them.
Leave me your feedback and comments, I’d love to hear if you have a better way of doing this or other suggestions.


How to find Silverlight Control’s Default Styles | Awesome Help…
Thank you for submitting this cool story – Trackback from DotNetShoutout…
Hey, I found this blog post while searching for help with Microsoft Silverlight. I’ve recently switched browsers from Safari to Firefox 3.2. Now I seem to have a issue with loading websites that have Microsoft Silverlight. Every time I browse page that requires Microsoft Silverlight, the site freezes and I get a “npctrl.dll” error. I can’t seem to find out how to fix the problem. Any help getting Microsoft Silverlight to function is very appreciated! Thanks
Hey, I came across this blog post while searching for help with fixing Microsoft Silverlight. I’ve recently changed browsers from Chrome to Internet Explorer 7. After the change I seem to have a issue with loading websites that have Microsoft Silverlight. Everytime I go on a website that requires Microsoft Silverlight, the page freezes and I get a “npctrl.dll” error. I cannot seem to find out how to fix it. Any help getting Microsoft Silverlight to work is very appreciated! Thanks
Hi, I found this blog article while searching for help with Microsoft Silverlight. I have recently switched internet browser from Opera to Firefox 3.2. Now I seem to have a issue with loading websites that use Microsoft Silverlight. Every time I go on a page that needs Microsoft Silverlight, the site crashes and I get a “npctrl.dll” error. I cannot seem to find out how to fix the problem. Any help getting Microsoft Silverlight to function is very appreciated! Thanks
…
I found your blog on google and examine a couple of of your early posts. Keep up the very good operate. I just additional up your RSS feed to my MSN News Reader. Looking forward to reading additional from you later on!…
would you please cooment on this, I would like a little more info, thanks
I know this isn’t exactly on topic, but i have a web site utilizing the same program as properly and i get troubles with my comments displaying. is there a setting i am missing? it’s doable you might help me out? thanx.
Test adcaa Blasts are Lovely
Thank you for each of your work on this web page. My daughter really likes conducting investigation and it is simple to grasp why. Many of us notice all relating to the dynamic means you produce advantageous guidelines by means of the web blog and therefore strongly encourage contribution from other individuals on the situation so our favorite daughter has been starting to learn a lot. Have fun with the remaining portion of the year. Your doing a wonderful job.
I抦 not that much of a online reader to be honest but your sites really nice, keep it up! I’ll go ahead and bookmark your site to come back later on. All the best
I’m nonetheless learning from you, however I’m improving myself. I certainly love studying every thing that is written in your blog.Keep the tales coming. I cherished it!
very helpful…
I preferred to thank you for this good article. http://pcltld.blog.cd/2011/08/31/2-be-social-bridesmaid-gowns/ I by all odds liked every little bit of it…
hello!,I like your writing very much! share we communicate more about your article on AOL? I require an expert on this area to solve my problem. Maybe that’s you! Looking forward to see you.
silver wardrobe…
[...]How to find Silverlight Control’s Default Styles | Tech Startup 3.0[...]…
nice work, love your theme, suits the site well
Own life is a single extensive means of exhausting. Samuel Servant
belajar bahasa inggeris…
[...]How to find Silverlight Control’s Default Styles | Tech Startup 3.0[...]…
Hello. As a self confessed Sports nerd your website is compelling and literally what I have been looking for my sporting pastime. I’m definitely going to book-mark it and recommend all my sports ardent buddies about it. Thanks.
I’m glad for being one in all countless readers on this exceptional internet page (:, many thanks for putting up.
Sup , I am forming a new site like ehow and I think your articles would really fit in well. Would you care if I link back to your website?
Hi there! My spouse and I often publish guest articles for other website owners to help increase publicity to our work, as well as provide terrific articles to weblog owners. It truly is a win win situation! If you happen to be interested feel free to e-mail me at: Reyelts26@gmail.com so we may communicate further. Cheers!
I don’t even understand how I stopped up right here, however I thought this submit used to be good. I don’t recognise who you are however certainly you’re going to a well-known blogger when you are not already
Cheers!
Thanks for an incredible submit, can study your others content. thanks for your thinking within this, I experienced a bit strike by this text. Thanks again again! You make an excellent time. Portrays natures best by the fantastic data here. I think if a greater number thought of it like that, they’d have a very better time period have the suspend ofing the matter.
makasih infonya….sedang belajar nih
I blog frequently and I really appreciate your information. This article has really peaked my interest. I am going to bookmark your blog and keep checking for new information about once per week. I subscribed to your RSS feed as well.
This is my first time go to see at here and i am really happy to read all at single place.
Very interesting info !Perfect just what I was looking for! ?°The only present is usually a portion of thyself.?± by Ralph Waldo Emerson.
I consider 1 of the advertisements triggered my browser to resize, you might need to place that in your blacklist.
Only wanna remark on couple of basic items, The web page type and style is great, the content material materials is actual terrific : D.
Your website is beautiful, which is popular among customers. I’ll come to visit again. Thank you very much!