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 7017601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:56:06+00:00 2026-05-27T22:56:06+00:00

I am wanting to learn C# and it seems everyone is switching from using

  • 0

I am wanting to learn C# and it seems everyone is switching from using WinForms to using WPF. WPF applications seems so much more complicated to me because of the use of the .XAML files that are used to building the Forms.

I am just asking before I get really involved, is the XAML files the only way to build WPF applications? Is there an easier method? I know I could just learn to use the WinForms which seems a lot easier since you basically have a Form object that you work with code but like I mentioned I think it would be best to build WPF apps

  • 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-27T22:56:06+00:00Added an answer on May 27, 2026 at 10:56 pm

    XAML does make things a lot easier if you know how to use it because it is more readable and declarative, but you can do (pretty much) anything in C# code as well if you like.

    e.g.

    <Border BorderBrush="Red">
        <TextBlock Text="Lorem Ipsum"/>
    </Border>
    

    vs.

    var border = new Border();
    border.BorderBrush = Brushes.Red;
    var textBlock = new TextBlock();
    textBlock.Text = "Lorem Ipsum";
    // The following step is implicit in XAML via the structure
    border.Child = textBlock;
    

    Though this can be written more concisely and hierarchically:

    new Border
    {
        BorderBrush = Brushes.Red,
        Child = new TextBlock
        {
            Text = "Lorem Ipsum"
        }
    };
    

    Generally i would always recommend using XAML, reasons include:

    • The parser optimizes the tree construction according to WPF’s layout system.
    • Creating DataTemplates in code is not supported. The construction using FrameworkElementFactories has been deprecated in favour of using the XamlParser (and i definitely do not recommend juggling XAML strings in code).
    • Separation between UI and code.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I come from a Java background. I am wanting to learn more about concurrency
I'm wanting to learn more about IL and CLR / DLR under the hood.
Ok I am wanting to learn more about how ASP.Net works under the hood.
I'm trying to use regex to validate input from the user, I'm wanting to
Presently I am working using single tier architecture. Now I am wanting to learn
Can one learn programming in VB.net using Visual Studio (Winforms stuff) and never learn
I've been wanting to learn assembly for a while now, and although I've tried
I'm really wanting to learn assembly. I'm pretty good at c/c++, but want a
I am wanting to access a website from a different port than 80 or
I have been wanting to learn to write a Flash app so that it

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.