什么是WPF的WinForms的程序员? [英] What is WPF for the WinForms programmer?

查看:127
本文介绍了什么是WPF的WinForms的程序员?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是WPF中的WinForms的程序员?

What is WPF to the WinForms programmer?

蒸馏水的WinForms被添加控件到窗体,并添加事件处理。这是简单和容易,让你迅速做出功能的GUI。

WinForms distilled is adding controls to forms, and adding event handlers. This is simple and easy and allows you to make functional GUIs quickly.

WPF,另一方面是XAML(?)+ code(?)这似乎是一个更复杂的方式,使prettier的UI慢。

WPF on the other hand is XAML (?) + Code (?) that seems like a much more complicated way to make prettier UIs slowly.

有很多对WPF方面存在的SO问题,但我正在寻找一个两句话泡壳如何grawk它。如果我只是专注于学习XAML?或者是书面的直接访问类和写作code(如的WinForms)真正的WPF?

There are plenty of existing SO questions on aspects of WPF but I'm looking for a two sentence blub on how to grawk it. Should I just focus on learning XAML? Or is real WPF written by directly accessing the classes and writing code (like Winforms)?

此外,什么实际的好处将一个WinForms程序员和我一样使用WPF看到了什么? 3D图形,文字任意缩放,以及自定义皮肤应用程序是无效的答案。什么是WPF提供了用于跟踪运输订单的应用程序。

Also, what practical benefit would a WinForms programmer like me see from using WPF? 3D graphics, arbitrary zooming of text, and custom 'skins' for applications are not valid answers. What does WPF offer an app used to track shipping orders.

推荐答案

WPF带来了

  • 声明UI编程:在UI(XAML)的presentation或外观已脱离了code(的.cs等所有),使得XAML可以创建独立的人谁擅长之类的事情 - 平面设计师。然后,他们提交他们的成品外观谁只写了code,使其工作的开发人员。 (更简单的东西可以直接在XAML中再次处理)应该给你更大的并行性和良好的UX(而不是开发者认可-UIS)
  • 数据绑定:再次声明式弯曲。您的声明指定模型属性此UI控件呈现,WPF采用提拉数据转换成控制及护理;更新修改的内容回来一起更改通知。
  • 改进综合控制模型 - 您现在可以嵌入几乎任何东西在任何所以现在的想象力永无止境
  • 数据模板,控制模板等 - 从code再次分离的用户界面。这些XAML模板指定()的数据结构或UI控件应该如何寻找到用户。
  • 更好地X :Ofcourse MS上一堆的其他方面一样呈现改善(更少的更新,GDI),缩放(分辨率无关),透明度,布局(不绝对),文本渲染,动画和放大器;视频支持,改进的事件模型等。所有
  • 样式,触发器:更易于全局应用统一的外观正与感觉于一身的就地风格(XAML再次)。触发器是执行的code块当一些事件发生,例如该控件的文本改变了..所以现在更新其前景属性为蓝色,表示修改。简单的东西可以直接在XAML中来完成。
  • Declarative UI Programming: The presentation or look of the UI (XAML) has been separated from the code (.cs et. all) such that the XAML can be created independently by people who are good at that sort of thing - graphic designers. They then submit their finished look to the developers who just write the code to make it work. (Simpler stuff can be handled again directly in XAML) Supposed to give you greater parallelism and good UX (as opposed to developer-approved-UIs)
  • Data Binding: Again a declarative bent.. You declarative specify which model property this UI control renders, WPF takes care of pulling the data into the control & updating modified contents back along with change notifications.
  • Improved Composite Control Model - You can now embed almost anything within anything so now imagination knows no bounds.
  • Data Templates, Control Templates etc.. - again separation of UI from code. These XAML templates specify (once) how a data structure or UI Control should look to the user.
  • Better at X: Ofcourse MS improved on a bunch of other aspects like rendering (fewer updates that GDI), Scaling (resolution independence), Transparency, Layouts (Non-absolute), Text rendering, Animation & Video support, An Improved Event Model, et. all
  • Styles, Triggers : Easier to apply uniform look-n-feel globally with in-one-place styles (XAML again). Triggers are blocks of code that execute when some event occurs e.g. 'the text of this control changed.. so now update its foreground property to blue to indicate "modified"'. Simple stuff can be done directly in XAML.

这篇关于什么是WPF的WinForms的程序员?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆