Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6161185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:26:09+00:00 2026-05-23T21:26:09+00:00

So I am starting to use XAML to create WPF applications in Visual Studio,

  • 0

So I am starting to use XAML to create WPF applications in Visual Studio, and it seems a LOT of the controls are different. Same name, but different.

Most notably (for me) is the Treeview and RichTextBox.

Since I am working in WPF, should I use System.Windows.Forms.TreeView or System.Windows.Controls.TreeView (same for rich text boxes, etc.)?

I do not like the way that the controls in System.Windows.Controls work. It may be because I am used to them in Forms, but for example, I don’t get why Controls.RichTextBox does not have a Text or a Clear method.

At the same time, it is really annoying having to use <wf:TreeView /> notation a lot, so I try to use the Sys.Windows.Controls versions of stuff as much as I can.

Is one way better than the other? Or is it just preference?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:26:09+00:00Added an answer on May 23, 2026 at 9:26 pm

    The preferred way is of course using WPF-native System.Windows.Controls. I think you’ll get used to them. WPF controls are superior to Windows Forms ones due to their support of binding, animation, styling, etc.

    The WPF controls are feature-rich, but the features are sometimes implemented not the same way as the Windows Forms counterparts. In particular, for RichTextBox you can use RichTextBox.Document for working with the text inside.

    For example, getting the text from a RichTextBox can be done as follows:

    TextRange textRange = new TextRange(richTextBox.Document.ContentStart,
                                        richTextBox.Document.ContentEnd);
    string text = textRange.Text;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just starting to use Visual Studio 2010 SP1 with IIS Express. When Visual
I am starting to use Eclipse for C++ developing after years with Visual Studio.
I am starting to use the jquery $.ajax() but I can't get back what
Just starting to use Cruise Control, but can't seem to find anything on this
I'm just starting to use the Enterprise Library Exception Handling block. It seems a
I am now starting to use PowerShell and after a lot of time using
I am just starting to use terminal for my programming needs. In a lot
I'm just starting to use the composite application libraries for WPF. In my shell
I am now starting to use Telerik's ASP.NET AJAX controls for 2009 Q1 on
I'm starting to use WiX in order to do automated builds to create msi's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.