Welcome to WindowsClient.net | Sign in | Join

Rob Relyea - XAMLified

WPF, Silverlight and Xaml

WPF Controls

Jaime Rodriguez – Jaime did a quick port of the Chart controls from the Silverlight Toolkit to WPF.  And he gave me a quick jab at the end of the post. :-)

WPF

Mike Stedman – 52 useful posts on WPF tips/tricks in under 2 months on The WPF Waltz

Rico Mariani (VS Chief Architect) - The Visual Studio Tech Roadmap Starring VS 2010.  Discusses the remodel of VS and its use of WPF.

Charles Petzold – Simple Cable simulation written in WPF and Silverlight.

Vince Rithner – New Sobees video

Misc

Andy Clymer - Powerpoint to OneNote converter – useful tool for evolving a slide deck.

Posted by Rob_Relyea | 1 comment(s)
Filed under: ,

DotNetRocksTV (dnrTV) just posted a discussion (with video of action in VS) with Billy Hollis that goes through a number of concepts in WPF/Silverlight layout (Grid, StackPanel, size to content), ContentControl (Button, ToolTip),  and XAML (attached properties, property-elements).

Very helpful for people new to WPF/Silverlight: Billy Hollis: XAML for Developers Part One

Posted by Rob_Relyea | 1 comment(s)
Filed under: , , ,

Given another 4 years of experience since I wrote “Our 7 Goals for XAML”, here is my updated list of XAML Benefits:

XAML Describes Data in a Concise, but Human and Machine Comprehensible, Way

Declarative formats provide the best and most concise way to represent many types of data. Comprehension of a declarative format is better than a general purpose programming language.

<BookList>
  <Book Author="J. K. Rowling"
            Title="Harry Potter and the Philosopher’s Stone"
            Year="1997" />
  <Book Author="L. Frank Baum"
            Title="Wizard of Oz"
            Year="1900" />
</BookList>

BookList bl = new BookList();
Book b1 = new Book();
b1.Author = "J. K. Rowling";
b1.Title = “Harry Potter and the Philosopher’s Stone”;
b1.Year = 1997;
bl.Add(b1);
Book b2 = new Book();
b2.Author = "L. Frank Baum";
b2.Title = “Wizard of Oz”;
b2.Year = 1900;
bl.Add(b2);

XAML is Useful for Many Types of Data

Microsoft already supports XAML Vocabularies to describe UI ([MS-WPFXV], [MS-SLXV]), Workflow (WF) and Electronic Paper (XPS).  Many other vocabularies are possible. 

XAML 2009’s new Name Referencing enables object graph definition, which opens up the number of types of data that can be described. WF 4 leverages this for modeling Flow Charts. WCF 4 Services can be modeled in XAML more naturally as well.

XAML uses Typed Object Models for Better Programming and Validation

Systems that have a strongly-typed OM (object model) enable:

  • Manipulation of objects after initialization with strong-typing, which enables compile time checking of code.
  • Markup Validation using the OM as the Type’s schema, as opposed to having to build an additional schema.
class Book
{
    string Author { get; set; }
    string Title { get; set; }
    int Year { get; set; }
}
Works:
b1.Year = 2000;

Compile Time Error:
b1.Year = "6/1999";
Validation Error:
<Book Year="6/1999" />

XAML is Extensible and Version Tolerant

Systems that are extensible through class inheritance can be modeled easily in XAML.  Since BookList can hold Books, and since one can derive a PaperbackBook from Book, I can use PaperbackBook wherever a Book is allowed, in code or markup.

class PaperbackBook : Book
{
}
<BookList>
  <Book … />
  <my:PaperbackBook … />
</BookList>

XAML's default is that every tag and attribute must be known, while HTML defaults to ignoring any mistyped element name, attribute name or attribute value. While there is a place for this ignoring to allow for forward compatibility, XAML uses Markup Compatibility and Extensibility (ECMA-376 Part5) for backward/forward compatibility.

XAML is Toolable

Systems described in XAML will be creatable and consumable by a wide set of tools.  This goal drives our decisions throughout XAML, from our XML representation to schema and beyond.

XAML is XML

In .NET 3 and Silverlight, all valid XAML files must be valid XML files. The opposite isn't always true…all XML files are not XAML files. This bet on XML is important because it enables an ecosystem of tools, systems, APIs and developers familiar with XML to get a strong start on understanding XAML.

.NET 4 is broadening what it means to be a XAML document. We’re introducing a XamlReader and XamlWriter abstraction in System.Xaml.dll which enables anybody to provide or store XAML based data.  We’ll provide readers and writers for XML, BAML, and object graphs, but many other storage or in memory representations are possible.  We believe that our XML representation shipped with .NET 3.0 in 2006 will continue to be the most common representation of XAML documents, but time will tell.

XAML Enables Event Driven Programming Models

XAML enables description of object graphs which include the setting of properties and the wiring of events.  This enables systems which need an event driven programming model.

XAML is Compiled or Interpreted

XAML is sometimes treated as source code, sometimes as runtime instructions.  Different frameworks will make different choices around this: WPF chooses to compile XAML into a binary representation which gets embedded inside an assembly; Silverlight chooses to validate the XAML at compile time, but it embeds the original XAML file into a .XAP file.  Either WPF or Silverlight can also interpret at runtime a XAML file that is not downloaded with the “application”.

http://blogs.msdn.com/usisvde/archive/2008/11/02/you-re-invited-to-xamlfest-denver-november-24-25.aspx

Posted by Rob_Relyea | with no comments
Filed under: , ,

WPF Apps

Carlos Quintero: Visual Studio 2010 PDC session: customizing and extending your developing environment. Scott Guthrie announced at PDC that VS2010 would have Shell UI and code editor made with WPF.  This session goes into some details…

Brian Goldfarb: Must See: MSNBC Election 2008 Electoral Map.  For those of you paying attention to US Elections today, this WPF app may be of interest…  (p.s. go vote)

WPF Releases - CodePlex.com/wpf

WPF Toolkit released with V1 of DataGrid, DatePicker/Calendar controls, VisualStateManager preview.

WPF Ribbon Preview now available

WPF Futures now includes a Client Profile Configuration Designer

Silverlight

Shawn Burke: Silverlight Toolkit Released. Great to see a bunch of new controls for Silverlight!

WPF/Silverlight

Beatriz Stollnitz: How can I expand items in a TreeView? Beatriz is blogging again! In case you missed it, Beatriz Stollnitz (formerly Beatriz Costa) is blogging again after a 8 month pause. She is now focused on controls for Silverlight and WPF.

WPF

Tim Sneath: WPF Developers: PDC Wrap-Up and Visual Studio Tooling Update

UIHero: WPF Assembly Source Code Now Available – now available for v3.5sp1.  Debug like a developer in the WPF team.

Charles Petzold: WPF Retained Graphics and the SubPropertiesDoNotAffectRender Flag

WPF for LOB

Beth Massi: New WPF How Do I Videos Released!

Vincent Sibal: DataGrid posts: Editing. DataGridComboBoxColumn. Frozen Row Sample.

WPF Tools

WPFPerf: Update to WPF Performance Profiling Tools.  Lots of goodness.

XAML

me: PDC08 News: XAML in .NET 4: XAML2009 & System.Xaml.dll. See what I’ve been focused on for the last year or two…

XAML Vocabularies

Zulfiqar: What’s new in WF v4.0. WF 4.0 to have “First class support for authoring XAML only workflows.”

Events & PDC08

ArcaneCode – Easy links to all PDC session videos/slide.  Very handy.  I have a few links to many of the WPF oriented sessions: PDC08 – WPF Talks

At PDC 08, Daniel Roth and I had a great time sharing info about the next wave of XAML goodness coming to .NET 4.

http://channel9.msdn.com/pdc2008/TL36/ has the full video (also the powerpoint is downloadable)…about 60 minutes of presentation and demo and then 15 minutes of questions and answers on the recording. 

1) XAML 2009 – new features coming to the XAML language

2) XAML Data Model – O-M-V + Types

3) New system component – System.Xaml.dll (System.Xaml CTP coming in November 2008)

4) XAML Ready Frameworks in .NET 4

  • Continued great support in WPF
  • Much improved XAML support in WF/WCF

Looking forward to the discussion!

-Rob

P.S. We plan on posting the source code for my demo when the CTP ships and Dan will post his source code soon as well.

This keynote was a joy for me to see…I hope you enjoy too.  I’m still polishing my PDC Talk (Thursday @ 8:30am), so this will be a brief post.

One blog comment about Guthrie’s keynote that I found from GeekTieGuy:

If you ever doubted that .NET and WPF were ready for “prime time”, doubt no longer. According to Scott Guthrie’s keynote, Visual Studio 2010 will have its user interface migrated to WPF. That almost blew my mind. Microsoft transitioning their bedrock developer tool to WPF - they wouldn’t do that lightly.

Watch an on-demand version of the keynote.  Here are some important points in the video:

WPF Momentum Video (0:00)

Ray Ozzie (2:00)

Windows7 - Steven Sinofsky (17:00)

I'm excited about the direction of Windows 7.

Building great Windows + Web Apps - Scott Guthrie (1:12:00)

Lots of good WPF/Silverlight Stuff in this section…including:

    • An announcement that major pieces of Visual Studio 2010 will be built with WPF
    • A really cool demo of the new VS code editor extensibility
    • Announcing that Windows 7 will include .NET 3.5sp1 in the box.

Windows Live Services - David Treadwell (1:49:00)

Good Live Mesh demo here and more.

Office 14 (2:14:00)

Nice peek at Office apps working in the browser and collaborating with Desktop Office apps.

Posted by Rob_Relyea | 2 comment(s)
Filed under: , , ,

11/2/2008: Update…I’ve added links to the videos of those sessions…

I’ll be arriving in LA tonight and I’m looking forward to a great week with developers from around the world! The WPF team is delivering a number of sessions that should be of interest:

SESSION LIST (of most interest to WPF developers)

DATE/TIME

SESSION

SPEAKER

Link to Online Video

Mon 10/27 3:30PM - 4:45PM

PC27 Microsoft Silverlight, WPF and the Microsoft .NET Framework: Sharing Skills and Code

Ian Ellison-Taylor

pdc2008/PC27

Tues 10/28 1:45PM - 3:00PM

PC46 WPF Roadmap

Kevin Gjerstad

pdc2008/PC46

Wed 10/29 1:15PM - 2:30PM

PC03 Windows 7: Developing Multi-touch Applications

Reed Townsend, Anson Tsao

pdc2008/PC03

Thurs 10/30 8:30AM - 9:45AM

TL36 Microsoft .NET Framework: Declarative Programming Using XAML

Rob Relyea,
Daniel Roth

pdc2008/TL36

Thurs 10/30 12:00PM - 1:15PM

PC45 WPF: Data-centric Applications Using the DataGrid and Ribbon Controls

Samantha Durante, Mark Wilson-Thomas

pdc2008/PC45

Thurs 10/30 1:45PM - 3:00PM

PC07 WPF: Extensible BitmapEffects, Pixel Shaders, and WPF Graphics Futures

David Teitlebaum

pdc2008/PC07

 

We’ll have a bunch of people from our team throughout the week  in the hand-on-labs, the lounge and the pavilion.  Please come tell us what you are doing, what you like that we are doing, and what we can do better.

If you want to drop by and chat with me at all, here are my current plans:

  • Tuesday – 12:30-3:30 – working at the WPF booth.
  • Wednesday – 6-9pm – Ask the Experts
  • Thursday – 8:30am, Petree Hall CD – Doing the first ever “XAML focused” PDC talk with Daniel Roth.  I’m excited to be able to talk in detail about things that our team has been working on, without announcing, for the past 2 years!

Looking forward to seeing you. For those of you who aren’t going to be in LA, I’ll try to do a decent amount of blogging during the event or shortly after digging into more details about XAML.  Also, most of the content will be available online within a day of being presented.  I’ll try to add links.

Posted by Rob_Relyea | 1 comment(s)
Filed under: , , ,

Silverlight’s XAML Vocabulary Specification has been published!

On Monday (October 13th, 2008), a press release announced the availability of Silverlight 2.  Contained in that press release was the following mentions in bold about [MS-SLXV] Silverlight XAML Vocabulary Specification 2008 v0.9:

Continued Commitment to Openness and Interoperability

Microsoft also will release the Silverlight Control Pack and publish on MSDN the technical specification for the Silverlight Extensible Application Markup Language (XAML) vocabulary. The SCP, which will augment the powerful built-in control set in Silverlight, will be released under the Microsoft Permissive License, an Open Source Initiative-approved license, and includes controls such as DockPanel, ViewBox, TreeView, Accordion and AutoComplete. The Silverlight XAML vocabulary specification, released under the Open Specification Promise (OSP), will better enable third-party ISVs to create products that can read and write XAML for Silverlight.

“The Silverlight Control Pack under the Microsoft Permissive License really addresses the needs of developers by enabling them to learn how advanced controls are authored directly from the high-quality Microsoft implementation,” said Miguel de Icaza, vice president, Engineering, Novell. “By using the OSP for the Silverlight vocabulary, they further solidify their commitment to interoperability. I am impressed with the progress Microsoft continues to make, and we are extremely satisfied with the support for Moonlight and the open source community.”

Scott Guthrie also metioned [MS-SLXV] in his “Silverlight 2 Released” blog post:

“We are also announcing today that we are releasing the Silverlight XAML vocabulary and schema under the Open Specification Promise (OSP), which enables anyone to create products that read and write XAML for Silverlight.”

What is in [MS-SLXV]?

1) Silverlight XAML Vocabulary: A list of XamlTypes (pp. 14-119) and XamlTextSyntaxes (pp. 120-132) that can be used in Silverlight XAML documents.  (you can think of this as the XAML Schema for Silverlight)

2) A list of any exceptions from [MS-XAML] XAML Object Mapping Specification 2006 that currently apply to Silverlight XAML documents.  (pp. 10-13)

How does this relate to [MS-XAML] and [MS-WPFXV]?

In March 2008, we shipped a v0.1 version of [MS-XAML] XAML Object Mapping Specification 2006 and [MS-WPFXV] WPF XAML Vocabulary Specification 2006, and we shipped v1.0 in June 2008.  You can think of [MS-XAML] as the specification of the XAML Language and [MS-WPFXV] as the WPF XAML Schema.

Most of [MS-SLXV] is a subset of what is specified in [MS-WPFXV].

What is next for [MS-SLXV]?

Our goal is to ship a v1.0 of [MS-SLXV] in the next 90-180 days.  We’d love to hear of any issues you find to ensure we can make it as complete as possible.

Happy tagging!

I’ve recently found that I like to modify an application while I can see it.  I’m working on some demos for the PDC08 XAML talk that Daniel Roth and I are doing.  Here is what I do:

1) Improve the app.

2) Run it.

3) Alt-PrintScreen

4) Paste it into OneNote

5) Use my tablet to mark up the next set of things that need to be done

Go back to 1.

 

image

Posted by Rob_Relyea | 4 comment(s)
Filed under:

Yesterday we did an API / conceptual model review with Mike Hillberg and John Gossman from WPF/Silverlight and Chris Anderson and Don Box from WCF/WF/etc…

We got a bunch of great feedback…and we’ve only made it through half the deck we had prepared.

To say thanks, I really should take them to lunch after the PDC.  Until then, to recognize the value of their feedback, I’m renaming a control in my PDC demo code from XamlNodeBox to DomBox.  :-)

Posted by Rob_Relyea | 2 comment(s)
Filed under:

10/31/2008 Update: The talk is over now...I summarize and link to the video of the talk here: PDC08 News: XAML in .NET 4: XAML2009 & System.Xaml.dll

XamlLogo

I’m very excited about the XAML talk that Daniel Roth and I are giving at PDC08 this October.  Althought PDC03 & PDC05 saw a bunch of XAML, we’ve never had a talk at PDC or TechEd focused on XAML – the declarative foundation for .NET/Silverlight.  As such, we have a bunch of very interesting things for those of you using XAML.

I gave a jpeg preview of one of our demos we’ll be showing.

Here is the XAML Talk abstract.

And here are links to other sessions.

XamlNodes

Posted by Rob_Relyea | 1 comment(s)
Filed under: ,

I’m prototyping and helping design some improvements in XamlWriter.Save() similar to the work that you can see on this wpf forum post about making a faster xamlwriter.

Looking at MSDN’s System.Windows.Markup.Primitives namespace, you’ll see the api documentation.

I’m excited by some of the possibilities we are discovering.

Posted by Rob_Relyea | 5 comment(s)
Filed under:

Lester Lobo taught me ctrl-space yesterday as a way to go back to the default formatting for the text selection.  Handy thing to know!

(It works in Word, LiveWriter...probably lots of places?)

Posted by Rob_Relyea | 1 comment(s)
Filed under:
Next page »
Page view counter