TextBox Auto Indent

I'm creating a code editor, and I need auto indentation, so is there any way to add auto indentation to a textbox? For example when I press tab and write a line and then press enter, it would insert a tab and I can write directly under my last entered line. Should I manually insert the tabs or I have to use a different control? Perhaps a richtextbox?


You should have a look at the ICSharpCode text editor. It support almost all a modern developer's editor should support, and it can handle auto identation too. Since you are using WPF you should start with this version. Even if you don't find all you want in the wiki, have a look as well since sometimes doc is not update with the real power of the component.

Need Your Help

Crystal Reports selecting data from two different databases

crystal-reports multiple-databases

I have a two databases that contain the exact same tables and are on the same server. I want to be able to create a report that will allow me to "merge" these databases so that when a user queries ...

How to get human readable class name in Ruby on Rails?

ruby-on-rails ruby ruby-on-rails-3 humanize

I am building an application with Ruby 1.9.3 and Rails 3.0.9

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.