index > Windows Presentation Foundation ("Avalon") > XAML - its purpose

XAML - its purpose

I'm not sure if I understand what XAML is. Is it supposed to be used for creating UI, like Windows Forms? If so, is its purpose to replace Windows Forms altogether? What else can XAML be used for?


hello
w3stfa11

XAML is an XML-based declarative markup language suitable for representing nested object hierarchies, such as those of CLR objects. This makes it a good choice for building user interfaces (which are inherently nested and hierachical). This is how Windows Presentation Foundation employs XAML. Windows Workflow on the other hand employs XAML to orchestrate workflows.

Windows Forms was built as a managed wrapper over Win32, and is as such limited by what Win32 can do. XAML when used in WPF works to achieve the same goal: building user interfaces on Windows. But WPF was developed from the ground up to be Microsoft's next-generation presentation subsystem -- with a new composition system, uniform programming model for documents, graphics, effects, animation and UI. WPF is currently not a replacement for WinForms. You will find that there are some things that WinForms does exceptionally well, and others that WPF excels in. Besides, there is good interoperability between these two technologies, so your solutions can potentially use the best of both worlds.




Ashish Shetty, Program Manager, Microsoft | http://nerddawg.blogspot.com
Ashish Shetty - MSFT

I would like to add a few comments to what Ashish has elaborated. Because XAML is an XML syntax, it lends itself to being edited outside of a development environment. The entry bar for creating a designer for WPF UIs is much lower than that for Winforms because of this.

Even further, you can mock up a WPF UI using nothing more than Notepad (similar to how I can mock up an HTML page with notepad) and that mockup is immediately useful, without modification to a developer.

Microsoft is emphasizing this feature of XAML with the Expression Interactive Designer, showing how a graphic designer can create a UI -- using tools targeted for a graphic designer -- for a developer and the developer can use those same files -- in Visual Studio -- to code the logic that drives the UI.

In addition, I'm sure just as there is a market for WYSIWYG HTML designers, once XAML takes off we will see a good deal of WYSIWYG XAML designers.

As a final note, there is nothing to stop another platform from implementing a XAML interpreter...although this is the least likely scenario to occur.

Okay one more thing really this time. Although as Ashish points out WPF doesn't excel at everything that Winforms handles well, I think what's lacking right now is basically some of the controls. I'm looking forward to the second release to address that issue. Can someone say Orcas? Where it is lacking against Winforms can be supplemented by custom controls (by yourself or a third party). And where it surpasses Winforms...it really REALLY knocks it out the box.

In summary, short-term I think WPF/XAML is more of a niche/early-adopter tool. In the long-term, I'm pretty sure it is the successor of winforms. How many developers do you know code in MFC today?




What's in your toolbelt? http://www.codeplex.com/Wiki/View.aspx?ProjectName=wpftoolbelt
ivolved_Mike_Brown
According to Chuck Jazdzewski:

"...XAML is an XML based object initialization language. Its job in life is to create a tree of objects."

sfedorov
reply 4

You can use google to search for other answers

 

More Articles

• Gotfocus WPF button timer
• WPF Text blurry
• Binding the TabItem Content
• Using ContextMenuOpening to populate ContextMenu?
• Dock Panel System
• Video playback frame rate and performance
• Example: DesktopSidebar Progress (built with July CTP)
• Animating a TextBlock's background
• How To Get Element within a Listview CellTemplate
• Difficulty installing .NET 3.0 on Windows XP
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• server.mappath equivalent in xaml
• Making window Borderless & TopMost w
• How to bind values to the Grid in WPF?
• TextBlock MouseDoubleClick
• Changing default editor for XAML
• Drawing high number of buttons
• Windows.FlowDocument Class
• Can't Install Interactive Designer: Wron
• SpeedRatio BUG?? - OK I'll Try this again
• Intellisense Problem in XAML
• can XBAP XAML reference isoloated storate
• Updated answer to "How to bind to s
• WPF Architectural Question
• Change order in Storyboard animation
• Activate Deactivate Triggers

Hot Articles

• Newbie question about WPF
• XAML compiler can't find object when bou
• how to move ResourceDictionary into sepa
• Disabling autocomplete for Combobox
• Adding new event handler to custom contr
• How to create an instance of ObservableC
• Howto change appearance and/or behavior
• How can i use strings defined in .resx f
• How to extend functionality using custom
• BindingExpression with XPath='Profiles/P
• DATA BINDING: Problems attaching a Valid
• Problem in Removing the Children(animati
• OneWayToSource Binding Mode
• custom control problems
• MouseEnter + grid row + animation problem

Recommend Articles

• No appropriate XAML tags for inline code
• Persistent Window state
• Resizable Custom ListView Column Headers
• Dependency Property's
• I want to do the input filter to TextBox.
• Problem using EventTrigger in a Style
• Drag from WPF --> Drop in Win32
• Healthcare application demo
• Dual Monitors .. slow
• Threading suggestions by experts
• Layout Transformation
• extending canvas
• MenuItem ItemsSource
• Is XAML designed for Win AND Web UI's ??
• ComboBox doesn't handle NotifyCollection