Rob Relyea

xaml:Blog

  • XAML Tour

    Filed under: , ,

    So I've described the 5 families of Avalon Elements: Panels, Controls, Shapes, Decorators, & ContentElements.

    In order to describe how XAML is used to build Element Trees (see XAML: Element Trees, Element Trees + Logic, or Class Defintion), here is the list of the next posts I plan.  I'll update this list as my plans change and add links as I write the posts.

    • Using Controls
    • Using Panels
    • Building Flow Documents Using ContentElements
    • Using Shapes
    • Building Fixed Documents
    • Using Decorators
    • Setting Properties via Compound/Compact Syntax
    • Resources/Styling
    • Animation
    • Databinding

     

    Please give me feedback along the way if there are other topics you have interest in.

    PostTypeIcon
    2,629 Views
  • XAML: Element Trees, Element Trees + Logic, or Class Definition

    Filed under:

    There are 3 main ways to use XAML.
    1) to define a tree of elements with animations, databinding, etc...
    2) to define a tree of elements (as in #1) with programming logic behind it
    3) to define a new class

    #1 doesn't require compilation of the xaml.  I'll be posting some details on #1 in the next several days.
    Today #2 & #3 do require compilation of the markup.

    Details behind Trees of Elements with Logic (#2)
    The way we accomplish #2 is to build a new class.
    SomePage.xaml:
    <DockPanel> ... </DockPanel>
    with no def:Class attribute will build what we refer to as an anonymous class.

    SomePage.xaml
    <DockPanel def:Class=“MyNS.MyPage“> ... </DockPanel>

    will build the MyPage class in the MyNS namespace.

    I can show this page in an Avalon application, by

    a) navigating to SomePage.xaml (we'll know to go run the appropriate code and load the appropriate binary representation of the tree from a .baml file)

    b) writing code (similar to this):
    MyNS.MyPage page = new MyNS.MyPage();
    someNavigationContext.Navigate(page);  //navigationContext could be a navigationwindow or a

    To go explore the details here, go look in obj\debug or obj\release for some *.g.cs files -- these are the output of our markup compilation.  (As always, if you are using vb, you can look for the same thing with a different extension *.g.vb)

    Example of building a class in XAML (#3)
    Don shows a great example of building a HelloWorld console app with XAML.

    PostTypeIcon
    3,138 Views
  • Avalon's 5 Element Families

    Filed under:

    XAML has been discussed a bunch lately.  It is easiest to show people what it is in person, but since that won't scale, I'll try to convey the same points by posting markup samples, descriptions and screenshots.

     

    Avalon, Longhorn & XAML

    Avalon is a presentation platform for the next generation of Windows (“Longhorn“).  XAML is a markup language that can be used on Longhorn for many things including creating desktop apps, web pages, and printable documents.  The system is very extensible.  If you want to build your own set of elements, you have the power to do that.  If you want to mix those elements with ours, you can.  If you want to just use yours, you can.  If you don't like angle brackets and would like to use only code, you can do that as well.

     

    That being said, let's talk about the 5 element families that Avalon has in the build we just released at the PDC: Panels, Controls, Shapes, Decorators and ContentElements.

     

    Panels

    Elements which Measure, Arrange and Render their children in the element tree (DockPanel, FlowPanel, TextPanel, etc…)

     

    Controls

    Elements which provide keyboard and mouse interaction models for the user (Button, TextBox, etc…)

     

    Shapes

    Elements which will render vector shapes (Ellipse, Rectangle, Path, etc…)

     

    Decorators

    Elements that can contain 1 child, and will adorn or affect the rendering of that child. (Border, TransformDecorator)

     

    ContentElements*  (needs renaming)

    Elements which provide semantic meaning for a documents structure (Paragraph, Section, Heading, etc…) and a few formatting tags (Bold, etc…)

     

    Using elements from those 5 families, we are trying to enable developers & designers the power to build great user experiences for Windows “Longhorn“.  We also want to provide a consistent markup and programming model experience in all of these element families.

     

    In future posts, I'll drill down in each of these families, showing some markup and code examples and pointing you towards more information from our SDK and blogs.

    PostTypeIcon
    7,776 Views
  • Finally something to blog about...

    What led to this blog
    The PDC was a great experience for me.  I gave a talk about the basics of Avalon's Markup & Programming model.  I spent a ton of time reading blogs and newsgroups and trying to help clarify things when I could.  I loved talking to people about Avalon.

    Now I'm finding myself leaving longer and longer comments on peoples blogs.  That is probably bad form. (?)

    Anyway, I'm going to begin posting to this, my first blog.  I've been reading Dave for years.  I'm just starting to use an aggregator to more easily read other's blogs.  I imagine that blogging will be fun.

    A little about me
    I'm a Program Manager on the Avalon Team.  Program Managers write specs, help design features, triage bugs, and whatever else is necessary to “ship the right product at the right time.”  Being part of the software creation process is a joy.  I've been on the Avalon Team since its start.  Before that I focused on IE's programmability (primarily DHTML).

    Things I focus on at work:  XAML, developer experience for Windows users, Avalon Programming Model, making sure that different languages and tools can target Avalon, MsBuild integration, ...

    What I plan to post
    I plan on posting primarily on Avalon and XAML topics with this blog, but we'll see what happens.

    My first set of posts will be a walkthrough of the talk I gave at the PDC (cli300).  In that talk, I showed a couple slides, but spent most of my time writing XAML and C#.  I haven't written the posts yet, but I hope to be able to convey all the information I got across in the talk, which was well received.

    Thanks to LonghornBlogs for hosting my blog.

    -Rob

    PostTypeIcon
    1,534 Views
« First ... < Previous 4 5 6 7 8