Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the top 3 main concepts in WPF? [closed]

Tags:

wpf

What are the top 3 main concepts in WPF that you need to understand in order to write good WPF code?

like image 342
gyurisc Avatar asked Jan 13 '09 08:01

gyurisc


People also ask

What are the basic features of WPF?

WPF provides a comprehensive set of application-development features that include Extensible Application Markup Language (XAML), controls, data binding, layout, 2D and 3D graphics, animation, styles, templates, documents, media, text, and typography.

How many types of binding are there in WPF?

WPF binding offers four types of Binding. Remember, Binding runs on UI thread unless otherwise you specify it to run otherwise. OneWay: The target property will listen to the source property being changed and will update itself.

Where is the main method in WPF?

In the case of WPF, the Main() is automatically generated when App. xaml is built and the /m switch is specified to make the C# compiler use that class as entry point. If you look at the project properties however, you'll find there's a setting for you to choose the startup object.

What are controls in WPF?

WPF SDK continues to use the term "control" to loosely mean any class that represents a visible object in an application, it is important to note that a class does not need to inherit from the Control class to have a visible presence.


2 Answers

I think the most important aspects of WPF concepts are:

  • Templates and Styles (the way you define the behaviour and appearance of your application)
  • Data Binding (the way you should glue together your UI with your business objects
  • Declarative UI definition through XAML

Maybe there are other elements but in my opinion those are fundamental for WPF thinking.

like image 188
Stefano Driussi Avatar answered Oct 14 '22 10:10

Stefano Driussi


I would say the single most important concept is the UI pattern Model-View-ViewModel, or as I like to call Model-View-ModelController. This is crucial to building apps successfully in WPF. Besides that, the real conerstones are Databinding, Templating, and Styles as others have mentioned. There is a nice post here on some common pitfalls to avoid when developing in wpf.

like image 45
Micah Avatar answered Oct 14 '22 08:10

Micah