Pain Point 1: XAML always create the controls by its default constructor
This means, you need to have a default constructor for you control, and the constructor will always be used by XAML. So, you can not use constructor dependency injection to pass things like services, gateways to your control. Also, you will not have chance to pass data in constructor, although the data might be must-have for the specific type of control
Paint Point 2: can not control XAML to create or not to create some part of GUI
Sometimes, the GUI is not static. It could be dynamic because the GUI would be different for the data it is presenting, such as for a meeting in the past it should show a adding note button, for a meeting in the future it should not. And more often, the security control requires the GUI to be different according to the role.
Paint Point 3: XAML is using XML, which contains too many visual noise
compared to things like YAML, XML is definitely not very friendly to our eyes. The things worse than XML I can come up is the braces of Lisp. Also, XML makes it harder to edit manually
Paint Point 4: Layouting in Grid
Using grid layout currently requires you to specify the row and column for all the children of a grid. It is very error-prone when the grid becomes large. But grid is a must-have for any non-trivial GUI, and there is not replacement for it yet.
Paint Point 5: Things not checked in compiling time
There are lots of things not checked by the compiler in XAML. Things like binding, resource looking up for example. And it is harder to cross reference between xaml and code.
Paint Point 6: More files
one file for xaml one file for cs. It requires more steps to create a new user control and is confusing to new comers.
Paint Point 7: Separating concerns
the default way events get handled is in the partial class of the XAML. It is not a good way of separating concerns and not good oo design. the windows and user controls usually doing too much in rich client application. It is not the fault of XAML in general, but it is not promoting a good model either by its weird way of hooking up event in xaml.
Paint Point 8: Hard to test
It is hard to test in many ways. First, not easy to inject dependency means you can not mock those expensive things like network connection. Second, creating a real window is taking more than ten seconds. Third, many things are in a static singleton model like resource looking up and the single instance application object.
分享到:
相关推荐
### XAML in a Nutshell: An Overview of the XML-Based Markup Language for Windows Presentation Foundation #### Introduction XAML, standing for Extensible Application Markup Language, is an XML-based ...
XAML(eXtensible Application Markup Language)是微软开发的一种标记语言,主要用于描述WPF(Windows Presentation Foundation)、UWP(Universal Windows Platform)以及Silverlight等应用程序的用户界面。...
3D MAX转XAML插件是一种工具,它允许用户在Autodesk 3ds Max这款流行的三维建模软件中创建的模型和场景转换成Windows Presentation Foundation(WPF)所使用的XAML语言。XAML是一种标记语言,常用于定义WPF应用程序...
【XAML入门精通资料】 XAML(eXtensible Application Markup Language)是一种声明式标记语言,主要用于构建Windows Presentation Foundation (WPF)、Windows Store apps、UWP(Universal Windows Platform)以及...
XAML(Extensible Application Markup Language)是一种用于描述用户界面(UI)的声明式标记语言,主要应用于.NET Framework,特别是Windows Presentation Foundation(WPF)和UWP(Universal Windows Platform)等...
标题中的“AI到XAML的导出插件”是指一个工具,它允许用户将Adobe Illustrator(AI)的设计图转换成Windows Presentation Foundation(WPF)或通用Windows平台(UWP)应用程序所使用的XAML(XAML是Extensible Application ...
In response, programming legend Charles Petzold is rewriting his classic Programming Windows—one of the most popular programming books of all time—to show developers how to use existing skills and ...
Part I of the book starts out with an awesome chapter on the anatomy of a Windows store app and then has a great chapter introducing XAML. The book is broken down into a total of 7 parts. I have ...
### Xamarin XAML语言教程知识点详解 #### 一、Xamarin及XAML概述 - **Xamarin**: 是一款跨平台移动应用开发框架,支持iOS、Android、Windows Phone等平台的应用开发。它采用C#语言编写,并提供了丰富的API来访问...
The Core XAML Reference section lets you dig even deeper into syntax rules and attributes for all XAML elements with a series of quick-reference chapters. This section divides XAML elements into ...
The Windows Store provides an amazing array of productivity tools, games, and other apps directly to the millions of customers already using Windows 8.x or Surface. Windows Store apps boast new ...
在Windows Presentation Foundation (WPF) 中,XAML(Extensible Application Markup Language)是一种标记语言,用于定义用户界面和应用程序的视觉元素。XAML文件通常包含了一系列的元素、属性和值,这些都用来描述...
### XAML Developer Reference知识点解析 #### 一、XAML简介 XAML(Extensible Application Markup Language)是一种由微软开发的标记语言,它基于XML标准,主要用于定义用户界面和数据表示。XAML最初是为了WPF...
SWF2XAML是一款强大的工具,专为将Adobe Flash(SWF)文件转换为Windows Presentation Foundation(WPF)的XAML格式而设计。这个过程在IT行业中被称为跨平台的迁移或兼容性转换,使得基于Flash的内容能够适应更广泛...
可以通过减少顶点数、使用LOD(Level of Detail)技术或预计算光照来优化模型。 总结起来,WPF结合XAML和3D库提供了一种灵活的方式来动态加载和展示3D模型。通过理解上述概念和技巧,开发者可以创建出交互性强、...
### XAML基础教程知识点概述 XAML(可扩展应用程序标记语言)是一种强大的XML-based语言,主要用于定义用户界面和用户交互的界面元素。XAML被广泛应用于.NET Framework中的WPF(Windows Presentation Foundation)...
Understanding this stack of new technologies and how they tie in to the proven C# language and the XAML standard is the subject of this book. Experienced writers Jesse Liberty, Phil Japikse, and Jon ...