Dear XAML Nation:
My days, like many of you, are filled with work with XAML. This space gets more exciting every year! I wanted to do a brain dump of our current work items, plans, etc… We first unveiled most of this information at our XAML talk at PDC 2008. If you haven’t seen that talk and you are hungry to understand much of the writing below, you should watch the video. We’re trying to be transparent with our progress with this complex set of components and scenarios. I look forward to your questions/comments now, and when you get the first .NET 4 beta…
Thanks, Rob
New XAML Engine for .NET 4 – System.Xaml
We are providing a unified, enhanced XAML engine for WPF, WCF, WF and more. This unified XAML engine is System.Xaml.dll (planned to ship in .NET 4).
New XAML Language Features: XAML2009 - XAML2009
At PDC 2008, we discussed ~9 new XAML language features. When .NET 4 Beta 1 ships, we’ll begin posting individual posts going into the different features.
XAML Reading
Our work to make WPF 4 use System.Xaml includes a new codebase for interpreting XAML files. XamlXmlReader will ship in System.Xaml.dll v4. Current users of XamlReader.Load() will automatically get the new engine doing the same work for them, but better.
BAML Reading
Our work to make WPF 4 use System.Xaml includes a new codebase for interpreting BAML files (a binary format). Baml2006Reader will ship in PresentationFramework.dll v4. Our focus here right now is compatibility and matching performance of BAML in v3. BAML in general, at least for built in WPF types, avoids much of the reflection that XAML usually needs to go through. Current calls to Application.LoadComponent() will automatically get the new engine doing the same work for them, but better.
- FxCop: With .NET 4, FxCop rules that can analyze BAML will be possible to write. If appropriate for your scenario, using XamlXmlReader in FxCop would also allow you to write FxCop rules to analyze XAML (if you distribute this as part of this app) as well (without having to create the corresponding object graph.)
Localization – WPF (BAML) – UI Localization
We have work under way to make the localization APIs that LocBaml relies on built on top of the System.Xaml infrastructure. As we do that work, we are attempting to address several issues in this space. We are unsure if this work will ship with .NET 4 or seperately. In v3, it was provided by PresentationFramework.dll, but this API generally isn’t needed at runtime, so we are considering not making it part of the framework directly.
As more and more groups inside and outside of Microsoft are localizing more and more BAML, we are getting a very good idea of which problems we need to focus on first.
Localization – XAML (Silverlight, other)
The work I mention above in “Localization – WPF (BAML)” will benefit localization scenarios (x:Uid based) for XAML as well (not just BAML). Systems that want to benefit from that should make sure to not crash if they see an “x:Uid” attribute.
Markup Compiler – WPF
We have a goal to completely rewrite the markup compiler, however it is very unlikely that will happen in .NET 4. We likely provide an updated Markup Compiler in conjunction with good support from Cider and Blend for XAML2009 features. Designers and compilers need to move in lock step, ideally.
BAML Writing
Since both Localization and the WPF Markup Compiler require Baml2006Writer, and since they both may not ship in the v4 box, we may not have Baml2006Writer baked enough to ship in the runtime in v4. I still hope to, but it may not be feasible. We’ll see. I know many of you want this!
- Obfuscation of BAML: once we provide the BamlWriter, we believe that obfuscation engines will be able to obfuscate type/member names in BAML.
XAML Writing
We have invested a lot of time and effort in XamlServices.Save() which uses XamlObjectReader and XamlXmlWriter under its covers. If all goes well, we will be providing a number of enhancements for current uses of XamlWriter.Save(). We currently don’t plan to make your old calls to XamlWriter.Save() use the new XAML Writing engine in v4, but if XamlServices.Save provides value for you, you can call it.
Markup Compiler – Silverlight
My team builds the markup compiler that validates XAML and generated .g.cs/.g.vb code files in Silverlight projects. We are doing some minor work in this space for SL3 and plan more major investments in releases beyond that.
XAML Language Spec - Specification
We are actually finally getting some customer issues on [MS-XAML] come in through our support channels. Great to get these. We plan on shipping a version updated with fixes for many of those issues and including the new XAML2009 features.
XAML Vocabularies – XAML Vocabularies, Specification
WPF v4 – we are planning on shipping a draft of the WPF v4 XAML Vocabulary when Beta 1 ships. This will be similar to [MS-WPFXV], with new stuff added in.
Other – inside Microsoft and around the world we continue to see more and more people use XAML for things other than UI, Workflows, Paper. We’re always excited to see new uses for XAML!