Customize SpellCheck on WPF Text Controls
Posted on March 25, 2008 | Leave a Comment
WPF has a great feature for spell checking called SpellCheck, which is applied on TextBox and RichTextBox controls. In this post I will explain about it and how can it be customized. Lets go back to the start, to activate the spell checker just set SpellCheck.IsEnabled property to True. Easy, right?. Take a look at the Continue reading...
3 Ways to Run NUnit From Visual Studio
Posted on March 22, 2008 | 4 Comments
Like it or not, whoever wants to have a stable code, need to write unit tests. There are 2 main unit testing frameworks for .Net Environment: MBUnit and NUnit. During this post, I am going to focus on NUnit and its integration with Visual Studio in particular. ![]()
Once we wrote our unit tests and compiled them, an assembly file is Continue reading...
How to Use HttpWebRequest over SSL
Posted on March 19, 2008 | 2 Comments
If you try to use HttpWebRequest for calling secured sites, and you are getting the following exception: “The underlying connection was closed: Could not establish trust relationship with remote server” here is what’s happening and how you can (hopefully) solve it:
When browsing to a secured site with your web browser, you get a dialog asking if you trust the certificate provided by the server. If you invoke a web service or scrapping… Continue reading...
Why Convert.ToInt32 Might be Dangerous
Posted on March 19, 2008 | 6 Comments
Casting float to int is interesting. Not only it causes the value to get truncated, but it also changes binary representation. When you want to cast float to int you have two options:
1) If you came from c/c++, there are several ways to do cast operations but the natural thing would be to use (int).
2) You can also use the Convert class to do the job (C#).
Check this Continue reading...