开发者

Why do WPF apps look like web pages?

开发者 https://www.devze.com 2023-01-30 04:31 出处:网络
I apologize for my newbie question by why do WPF apps look like web pages? I am new to gui and still shopping for a book to learn gui programming.The push seems to be in the direction of WPF but all

I apologize for my newbie question by why do WPF apps look like web pages?

I am new to gui and still shopping for a book to learn gui programming. The push seems to be in the direction of WPF but all the screenshots of WPF applications that I've seen look like cheap web pages. Frankly I'd be ashamed to sell an app that looked like a web page.

I realize that开发者_如何学运维 WPF is built on XML technology but can you not build normal looking WPF apps in Visual Studio (via button("widget")) drag-n-drop? In other words an app that does not look like a web page?

How can WPF be a replacement for WinForms or the like when it doesn't provide the same standard application look?


The default look of WPF applications is admittedly rather simple, but WPF allows unprecedented control over how your application looks.

Here are some examples, all of them WPF applications.

Why do WPF apps look like web pages?

Why do WPF apps look like web pages?

Why do WPF apps look like web pages?

Why do WPF apps look like web pages?

Why do WPF apps look like web pages?

Why do WPF apps look like web pages?


If you are to deveop an application under .net and are able to target .net 3.5 or above, you will want to use wpf. If you don't know much about ui technology and want to work with .net, understanding windows forms is useful but not necessary. You should learn wpf regardless.

2 perks that I have found while using the framework: - it is very easy to inject branding and custom interactivity into your app. It is then very easy to change these when your sales guy decides the want it blue, not red. - the way components are organized on screen is relational like a webpage, not coordinate based like windows forms. This is ideal for scenarios when translated strings will change length (English to German for example). Under usual circumstances the ui will resize itself automatically at runtime to make it all fit.

If you just throw in controls and don't change the style of anything, your first wpf applications will look almost identical to native win32 applications. It is very easy to change this, but you will achieve great results regardless of the "look" you choose. Microsoft also provide the tools to create new ui components that look like native buttons. There are a host of other features that will make you grin while learning!

This is not a technical note, but at the moment wpf is a highly sellable skill and looks great on a cv! Companies want great branding in their apps. Wpf helps that happen.


WPF does provide the same appication look wich is the default look. When you drag and drop your controls onto the design surface (just like in windows forms, MFC ...) the controls look as you would expect them to look under the current theme. Chances are that you have seen quite some WPF applications without noticing. Just because they look like any other app.

The reason you might see more WPF based applications that have some sort of custom look and feel to them is simple because it is so much easier to do what ever you like to your GUI than in any other GUI framework on any platform. This is both blessing and curse. While you being absolutely flexible it is easy to do absolutely horrible stuff.


user440267, I believe that the most application in WPF are built using normal Windows. But there is an option which we don't create a window, instead we create a page, which behave like you think.

0

精彩评论

暂无评论...
验证码 换一张
取 消