<?xml version="1.0"?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule"   xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>O&apos;Reilly Longhorn Annotations</title>
		<link>http://www.oreillynet.com/</link>
		<description>Annotations to the Longhorn documentation from O&apos;Reilly &amp; Associates, Inc.</description>
		<language>en-us</language>	<item>
                <title>Appling Effects to Markup</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows.media/c/imageeffect/imageeffect.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;I spent a while trying to work out how to apply an ImageEffect such as an ImageGlow to some markup.  There's an obvious problem with trying to do this: ImageEffects are bitmap effects, but XAML is not about bitmaps. This didn't seem like it should be a problem, as there's obviously something in the system capable of rasterizing the XAML - it's in pixel form by the time you see it on screen.  So I was looking for something similar to the way in which GDI+ lets you create a Graphics object that draws directly into a bitmap.&lt;/p&gt;

&lt;p&gt;Unfortunately, it turns out that you can't do this...yet.  Greg Schecter gave a talk at the PDC on the Avalon media architecture, so I asked him about this.  The version of Longhorn released at the PDC doesn't provide the ability to do this - the features to allow markup to be rendered into bitmap or video streams are planned but not yet present.&lt;/p&gt;

&lt;p&gt;The pleasing news was that not only is this coming, they also plan to support the application of bitmap-based image effects to markup directly.  So there will be some fairly straightforward way of getting Avalon to transform your XAML to a bitmap and apply one or more effects for you.  It's nice to know it's on its way, even if it isn't here yet. (I just wish I'd known before I spent a day trying to work out how to do it! :-) )&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Tue, 28 Oct 2003 17:58:36 PST</pubDate>
	</item>	<item>
                <title>Using an ImageEffect</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows.media/c/imageeffect/imageeffect.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;I was unable to find any examples on how to use the various ImageEffects either in code or in markup.  I can't work out how to use these from markup, but here's a way of setting an Image control's source to use an image effect in code.  Given the following markup:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;FlowPanel xmlns=&amp;quot;http://schemas.microsoft.com/2003/xaml/&amp;quot;
  xmlns:def=&amp;quot;Definition&amp;quot; def:Class=&amp;quot;Default&amp;quot;
  Loaded=&amp;quot;OnLoaded&amp;quot;&amp;gt;

  &amp;lt;Image ID=&amp;quot;img&amp;quot;/&amp;gt;

&amp;lt;/FlowPanel&amp;gt;
&lt;/pre&gt;

&lt;p&gt;we can use the following codebehind to set the Image's source to use an ImageEffect:&lt;/p&gt;

&lt;pre&gt;
using System;
using System.IO;
using MSAvalon.Windows.Media;

namespace Ian
{
  public partial class Default
  {
    private void OnLoaded(object sender, EventArgs e)
    {
      using (Stream stm = File.OpenRead(&amp;quot;btn.png&amp;quot;))
      {
        ImageData src = new ImageData(stm);
        ImageEffectGlow glow = new ImageEffectGlow();
        glow.Input = src;
        ImageData output = new ImageData(glow.Output, false, 
                new IntegerRect(), new ImageSizeOptions(), false);
        img.Source = output;
      }
    }
  }
}
&lt;/pre&gt;

&lt;p&gt;(Here, &quot;btn.png&quot; is a bitmap file - use whatever bitmap source you like.)  This loads a bitmap, and then sets it as the input to an ImageEffectGlow.  It then builds a new ImageData from the effect's output - the Image control requires its Source property to be set to an object of type ImageData.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Fri, 24 Oct 2003 03:53:43 PST</pubDate>
	</item>	<item>
                <title>Building an ImageSource From Scratch</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows.media/c/imagesource/imagesource.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;In classic GDI+ it's easy to create your own Bitmap and then obtain a Graphics object that lets you draw into it.  It's not obvious if you can do the same thing in Avalon - ImageSource appears to act as a source of bitmap data, but it's not clear how to build one from scratch.&lt;/p&gt;

&lt;p&gt;If you don't mind generating the raw bytestream then it's pretty easy.  But what I want to be able to do is take some markup (or maybe a Drawing object) and turn it into an ImageSource.  Why?  Because I'd like to be able to apply some of the ImageEffects like ImageEffectGlow or ImageEffectTint to bits of markup.  ImageEffects are all bitmap-based effects - they work on pixel data.  So you need to give them an ImageSource as their input.  If there were a way of converting markup into bitmap data then you could apply these effects to markup too.  But unfortunately, the PDC version of Longhorn doesn't support this.&lt;/p&gt;

&lt;p&gt;In his talk on the Avalon Media layer at the PDC, Greg Schecter talked about 'top level objects' - these are the things that will apparently allow XAML to be converted to bitmaps or video streams.  (XAML supports animation, so you might want to generate a sequence of bitmaps from it.)  These are coming, but they're not in the build given out at the PDC.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Tue, 28 Oct 2003 18:01:53 PST</pubDate>
	</item>	<item>
                <title>Abbreviated Path Data Syntax</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows.shapes/c/path/p/data.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;In a few examples scattered around the SDK, the Path element is shown with its Data property set to a text string, rather than being set as a complex property containing a GeometryCollection.  This allows a much more succinct expression of a path.  For example:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;Path Stroke=&amp;quot;Black&amp;quot; 
  Data=&amp;quot;m 10,50 C 10,30 30,10 50,10 C 70,10 80,20 80,30 C 80,40 70,50 60,50 C 50,50 40,40 40,30 C 40,20 50,10 70,10 C 90,10 110,30 110,50 C 110,70 90,90 60,90 C 30,90 10,70 10,50 z&amp;quot;/&amp;gt;
&lt;/pre&gt;

&lt;p&gt;This contains a StartSegment, 8 BezierSegments, and a CloseSegment.  It avoids the boilerplate for the complex property approach - this requires Path.Data, GeometryCollection, PathGeometry, PathGeometry.Figures, PathFigureCollection, PathFigure, and PathSegmentCollection XML elements to be added before we even get to the main path data.  The only syntactic disadvantages with this terse approach are that it results in an overly long line (you cannot split the value of an attribute across multiple lines in XML).&lt;/p&gt;

&lt;p&gt;For some reason however, the syntax is undocumented.  The few examples in the SDK allow us to determine a few: M &lt;b&gt;m&lt;/b&gt;oves to a new position, C draws a Bezier &lt;b&gt;c&lt;/b&gt;urve.  H and V draw &lt;b&gt;h&lt;/b&gt;orizontal and &lt;b&gt;v&lt;/b&gt;ertical line sections.  Z closes a figure.  (Or is that clo&lt;b&gt;z&lt;/b&gt;es?)  The use of uppercase vs. lowercase for these commands appears to select between relative and absolute coordinatates.&lt;/p&gt;

&lt;p&gt;But what about ArcSegment, LineSegment, and QuadraticBezierSegment?  Presumably there are commands for these.  It would be nice to have the documentation for them!&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Fri, 24 Oct 2003 02:46:13 PST</pubDate>
	</item>	<item>
                <title>EvenOdd vs NonZero Fill Rules</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows.media/e/fillrule/fillrule.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;The distinction between these two fill rules (or 'winding' rules as they are sometimes known) is not immediately obvious, since for some shapes the two rules behave in exactly the same way.  (And at the time of writing this annotation, this page has no explanatory text at all, which makes it even harder to discern the meaning!)  The distinction is only important when a shape has areas which are enclosed by more than one outline.&lt;/p&gt;

&lt;p&gt;There are two ways this can happen.  First, a path may contain multiple figures.  If one figure is either completely inside another, or if two overlap, then some areas of the shape will be inside both figures.  Second, a path may overlap itself - since a path can be any shape, the path's outline can intersect itself. Again, this results in there being certain areas of the shape being multiply enclosed; there may be only one outline, but because it intersects itself, it would be necessary to cross the outline twice to get from the doubly enclosed area to a point entirely outside of the shape.&lt;/p&gt;

&lt;p&gt;A question arises for these cases: if the shape has a Fill set, should the multiply-enclosed areas be filled?  The FillRule answers this.&lt;/p&gt;

&lt;p&gt;The EvenOdd rule is the simplest.  It says that whether or not a region is filled depends on whether there are an even or an odd number of boundaries between the region and the outside of the shape.  This means that each time an edge is crossed, we alternate between filling and not filling.&lt;/p&gt;

&lt;p&gt;The NonZero rule is a little more peculiar.  It takes the direction in which the edge is drawn into account.  Executing the NonZero rule is equivalent to the following process: to determine whether a given point is filled, draw a line between that point and any point outside of the shape.  For each edge of the shape that this line crosses, either add or subtract one from the running total; whether you add or subtract depends on the direction in which the edge is travelling.  (The direction of travel is that which you get by tracing round the shape, following the points in the path data in the order in which they are defined.)&lt;/p&gt;

&lt;p&gt;For example, consider a path consisting of two concentric circular figures.  If the two circles were drawn with path data running in the same direction, the count for the innermost region will be either 2 or -2 depending on the direction of the circles.  Either way it's non-zero, which means the area is filled.  But if one of the circles is drawn in the opposite direction from the other, the count will be zero - one edge will cancel out the other.  So even though the outline of the shape looks the same - two concentric circles - the direction of travel determined which regions were filled.&lt;/p&gt;

&lt;p&gt;It's often best to try a real example.  The following shape yields different results with the two rules:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;Canvas&amp;gt;
  &amp;lt;Path Stroke=&amp;quot;Black&amp;quot; Fill=&amp;quot;Green&amp;quot; FillRule=&amp;quot;EvenOdd&amp;quot;
        Data=&amp;quot;m 10,50 C 10,30 30,10 50,10 C 70,10 80,20 80,30 C 80,40 70,50 60,50 C 50,50 40,40 40,30 C 40,20 50,10 70,10 C 90,10 110,30 110,50 C 110,70 90,90 60,90 C 30,90 10,70 10,50 z&amp;quot;/&amp;gt;

  &amp;lt;Path Stroke=&amp;quot;Black&amp;quot; Fill=&amp;quot;Green&amp;quot; FillRule=&amp;quot;NonZero&amp;quot; Canvas.Top=&amp;quot;100&amp;quot; 
        Data=&amp;quot;m 10,50 C 10,30 30,10 50,10 C 70,10 80,20 80,30 C 80,40 70,50 60,50 C 50,50 40,40 40,30 C 40,20 50,10 70,10 C 90,10 110,30 110,50 C 110,70 90,90 60,90 C 30,90 10,70 10,50 z&amp;quot;/&amp;gt;
&amp;lt;/Canvas&amp;gt;
&lt;/pre&gt;

&lt;p&gt;However, this shape yields the same results for either rule:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;Canvas&amp;gt;
  &amp;lt;Path Stroke=&amp;quot;Black&amp;quot; Fill=&amp;quot;Green&amp;quot; FillRule=&amp;quot;EvenOdd&amp;quot;
        Data=&amp;quot;m 10,50 C 10,30 30,20 40,20  C 60,20 60,50 80,50 C 90,50 100,40 100,30 C 100,20 80,10 60,10 C 40,10 20,20 20,30 C 20,40 30,50 40,50 C 60,50 60,20 80,20 C 90,20 110,30 110,50 C 110,70 90,90 60,90 C 30,90 10,70 10,50 z&amp;quot;/&amp;gt;

  &amp;lt;Path Stroke=&amp;quot;Black&amp;quot; Fill=&amp;quot;Green&amp;quot; FillRule=&amp;quot;NonZero&amp;quot; Canvas.Top=&amp;quot;100&amp;quot; 
        Data=&amp;quot;m 10,50 C 10,30 30,20 40,20  C 60,20 60,50 80,50 C 90,50 100,40 100,30 C 100,20 80,10 60,10 C 40,10 20,20 20,30 C 20,40 30,50 40,50 C 60,50 60,20 80,20 C 90,20 110,30 110,50 C 110,70 90,90 60,90 C 30,90 10,70 10,50 z&amp;quot;/&amp;gt;
&amp;lt;/Canvas&amp;gt;
&lt;/pre&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Fri, 24 Oct 2003 02:45:28 PST</pubDate>
	</item>	<item>
                <title>Logical Tree -> XAML</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows.serialization/c/xamlrootserializer/xamlrootserializer.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;Although your XAML source is not preserved by the compilation process, it is still possible to generate an XAML representation of your UI using the XamlRootSerializer class:&lt;/p&gt;

&lt;pre&gt;
using System.IO;
using System.ComponentModel.Design.Serialization;
using MSAvalon.Windows;
using MSAvalon.Windows.Serialization;

public class XmlSaver
{
  public static void SaveAsXaml(FrameworkElement elem, string fileName)
  {
    XamlRootSerializer xamlSer = new XamlRootSerializer();
    DesignerSerializationManager dsm = new DesignerSerializationManager ();

    using (dsm.CreateSession())
    {
      using (StreamWriter w = new StreamWriter(File.OpenWrite(fileName)))
      {
        xamlSer.SerializeObjectTree(dsm, w, elem);
      }
    }
  }
}
&lt;/pre&gt;

&lt;p&gt;This produces XAML which is likely to be considerably more verbose than your original markup.  But it can still be useful to get markup even if it's not the original.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Fri, 24 Oct 2003 02:42:35 PST</pubDate>
	</item>	<item>
                <title>StartPoint and EndPoint Coordinates</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows.media/c/lineargradientbrush/lineargradientbrush.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;A linear gradient brush must specify the start and end points of the fill.  This is done with the StartPoint and EndPoint properties, but it's not immediately obvious how these will be interpretted.  If you are using absolute positioning on a Canvas, and you attempt to set the fill start and end points using the coordinate system of the Canvas, you will not get the results you require.&lt;/p&gt;

&lt;p&gt;By default, the StartPoint and EndPoint of a brush use a coordinate system which is relative to the brush itself: the top left of the brush is at (0, 0), and the bottom right is at (1, 1).  For a Rectangle, this is pretty straightforward, but for other shapes it is less clear - where are the corners of a brush when it is applied to some text?  Is it the bounding box of the glyphs?  Does it take into account the line spacing?  A simple experiment lets us find out:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;DockPanel xmlns=&amp;quot;http://schemas.microsoft.com/2003/xaml/&amp;quot;&amp;gt;

  &amp;lt;TextBox DockPanel.Dock=&amp;quot;Top&amp;quot; FontSize=&amp;quot;72&amp;quot; Height=&amp;quot;100&amp;quot;
           Foreground=&amp;quot;VerticalGradient Black White&amp;quot; /&amp;gt;

&amp;lt;/DockPanel&amp;gt;
&lt;/pre&gt;

&lt;p&gt;This applies a vertical gradient fill from black to white across the brush for the text of a TextBox.  If you type in some lowercase letters with no ascenders or descenders (e.g, &quot;ooeeooeeoo&quot;) you will see that the tops of the letters are completely black and the bottoms are completely white.  But if you now type in either an uppercase letter, or a lowercase letter with an ascender (e.g. &quot;b&quot; or &quot;i&quot;), you will see that the range of the brush changes - it will now start from the top of the ascender.  This has the effect of changing the appearance of the other letters typed in so far - the tops of the smaller letters will go from being black to grey when you add a taller letter.  Likewise, if you add a letter with a descender (e.g. &quot;y&quot; or &quot;j&quot;) you will find the the fill becomes larger again, so that it does not become completely white until the bottom of the descenders.  Again, this changes the appearance the letters that were there before.&lt;/p&gt;

&lt;p&gt;This reveals that the brush bounds are the same as the bounds of the letter outlines.  While this makes sense, it's rather inconvenient.  What if I actually wanted the text in my textbox to use a vertical linear gradient that stayed still?  The problem with this example is that the fill moves as the user types in letters.&lt;/p&gt;

&lt;p&gt;Fortunately, the MappingMode property comes to the rescue.  MappingMode lets us chose whether the coordinate system of the Brush is relative to its bounding box, or the coordinate system of the containing panel.  The following example uses this property to apply a fill to the text whose range is fixed regardless of the actual bounding box of the text:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;DockPanel xmlns=&amp;quot;http://schemas.microsoft.com/2003/xaml/&amp;quot;&amp;gt;

  &amp;lt;TextBox DockPanel.Dock=&amp;quot;Top&amp;quot; FontSize=&amp;quot;72&amp;quot; Height=&amp;quot;100&amp;quot;&amp;gt;
    &amp;lt;TextBox.Foreground&amp;gt;
      &amp;lt;LinearGradientBrush MappingMode=&amp;quot;Absolute&amp;quot;
           StartPoint=&amp;quot;0,0&amp;quot; EndPoint=&amp;quot;0,100&amp;quot;&amp;gt;
        &amp;lt;LinearGradientBrush.GradientStops&amp;gt;
          &amp;lt;GradientStopCollection&amp;gt;
            &amp;lt;GradientStop Color=&amp;quot;Black&amp;quot; Offset=&amp;quot;0&amp;quot;/&amp;gt;
            &amp;lt;GradientStop Color=&amp;quot;White&amp;quot; Offset=&amp;quot;1&amp;quot;/&amp;gt;
          &amp;lt;/GradientStopCollection&amp;gt;
        &amp;lt;/LinearGradientBrush.GradientStops&amp;gt;
      &amp;lt;/LinearGradientBrush&amp;gt;
    &amp;lt;/TextBox.Foreground&amp;gt;
  &amp;lt;/TextBox&amp;gt;

&amp;lt;/DockPanel&amp;gt;
&lt;/pre&gt;

&lt;p&gt;Sadly this is much more verbose.  As far as I can tell, the MappingMode property can only be set if you abandon the abbreviated gradient fill syntax.  However, this just makes the markup larger - there isn't any extra runtime cost associated with this.  (The abbreviated syntax expands out to the same code as the more verbose syntax.)&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Fri, 24 Oct 2003 02:41:08 PST</pubDate>
	</item>	<item>
                <title>Resolution Independence</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows/e/unittype/unittype.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;One of the unit types supported by this enumeration is Pixel.  However, despite what the name suggests, this is a resolution-independent unit - it means 1/96 inch.  As it happens, if you are running Windows with 'small fonts' Windows assumes by default that your display resolution is 96dpi, so one UnitType.Pixel happens to map onto one screen pixel.  But if your screen has a higher resolution (and Windows is aware of this fact) one UnitType.Pixel will be several physical pixels wide. (It would be less than a physical pixel wide if you had a very low resolution device).  One UnitType.Pixel might not even map to a whole number of physical pixels.&lt;/p&gt;

&lt;p&gt;All measurement in Avalon is device-independent.  This means that a visual element can be given an absolute size, independent of display or output technology.  There are a number of advantages to this approach.  It means that when a document is printed, everything should remain the same size.  (Printers often have a very high resolution. If you write Win32 code that works in terms of pixels, it can end up producing incredibly small drawings when printing.)  It also means that programs can look right on very high resolution displays - it is possible to build flat panel displays with a resolution of 300dpi or better, but these are currently unusable with Windows because too many programs use physical pixels for their measurements. Such programs end up with an unusably small user interface.  But with Avalon's resolution independence, it will start to become practical for very high resolution screens to come out of the research labs and onto our desktops.&lt;/p&gt;

&lt;p&gt;Another advantage of resolution independence is that all displays are intrinsically scalable.  This means that you can enlarge or reduce the display to an arbitrary size by applying a transformation.  This is a lot more flexible than using a simple screen magnifier (and the results look better).  The following markup example shows how this would look:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;Canvas xmlns=&amp;quot;http://schemas.microsoft.com/2003/xaml&amp;quot;&amp;gt;
  &amp;lt;TransformDecorator&amp;gt;
    &amp;lt;TransformDecorator.Transform&amp;gt;
      &amp;lt;ScaleTransform ScaleX=&amp;quot;4&amp;quot; ScaleY=&amp;quot;4&amp;quot;/&amp;gt;
    &amp;lt;/TransformDecorator.Transform&amp;gt;

  &amp;lt;Button Canvas.Top=&amp;quot;2&amp;quot; Width=&amp;quot;100&amp;quot; Height=&amp;quot;20&amp;quot;&amp;gt;
    Click me
  &amp;lt;/Button&amp;gt;

  &amp;lt;/TransformDecorator&amp;gt;

  &amp;lt;Button Canvas.Top=&amp;quot;110&amp;quot; Width=&amp;quot;400&amp;quot; Height=&amp;quot;80&amp;quot;&amp;gt;
    Click me
  &amp;lt;/Button&amp;gt;

&amp;lt;/Canvas&amp;gt;
&lt;/pre&gt;

&lt;p&gt;This example enlarges a button to four times its normal size.  This is not the same as simply setting a button's width and heigh to four times the size.  To illustrate the difference, this example contains two buttons. The first has been scaled up, while the second is simply very large.  The most obvious difference is that with the second button, the text has remained at the default size, which wouldn't be much use if your intention was to improve readability.  Compare this with the first button, where all of its features have been enlarged.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Fri, 24 Oct 2003 02:38:49 PST</pubDate>
	</item>	<item>
                <title>The '&lt;?Mapping ?&gt;' Processing Instruction</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/core/overviews/styles.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;Many of the examples (including some on this page) have XML Processing Instructions of the form:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;?Mapping XmlNamespace=&amp;quot;media&amp;quot; ClrNamespace=&amp;quot;MSAvalon.Windows.Media&amp;quot;
Assembly=&amp;quot;PresentationCore&amp;quot;?&amp;gt;
&lt;/pre&gt;

&lt;p&gt;I couldn't find this documented anywhere, but it appears to control the mapping between XML Namespaces and .NET Namespaces.  There is a small amount of documentation for the programmatic aspects of this mapping to be found in the MSAvalon.Windows.Serialization.Mapper class, but apparently nothing describing how these mappings are dealt with in markup.&lt;/p&gt;

&lt;p&gt;Most of the time, the mapping between markup elements and .NET classes is apparently magic - we can just use element names such as &amp;lt;Text&amp;gt; or &amp;lt;Ellipse&amp;gt;, and the XAML compiler somehow works out that the first should be in the MSAvalon.Windows.Controls and MSAvalon.Windows.Shapes namespaces respectively.&lt;/p&gt;

&lt;p&gt;I don't know how these built-in element name mappings are handled.  But the Mapping processing instruction allows us to use classes which XAML doesn't support intrinsically.  If you wish to use a particular class, you simply add a Mapping instruction which defines the namespace and assembly name in which the class is defined, and assign this to an XML namespace URI of your choosing.  Any elements you place in this namespace in the XAML will then use classes from the selected namespace and component.  For example, given the declaration above, the following element:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;GradientBrush xmlns=&amp;quot;media&amp;quot; ... /&amp;gt;
&lt;/pre&gt;

&lt;p&gt;explicitly refers to the MSAvalon.Windows.Media.GradientBrush class defined in the PresentationCore assembly.&lt;/P</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Fri, 24 Oct 2003 02:37:37 PST</pubDate>
	</item>	<item>
                <title>Beyond Simple Images or Text</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/controls/tasks/btnwithimage_wcp.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;The examples on this page show two buttons, one containing just Text, and one containing just an image. In fact it is possible to build much more interesting-looking buttons than this.  Button derives from ContentControl, which means that it contains some more markup as its content.  Typically this content will just be some text, but in fact it could be any markup; the Image element used here is just one example.  Here's a more interesting one:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;Canvas xmlns=&amp;quot;http://schemas.microsoft.com/2003/xaml&amp;quot;&amp;gt;
  &amp;lt;Button ID=&amp;quot;btn1&amp;quot; Canvas.Top=&amp;quot;2&amp;quot; Width=&amp;quot;100&amp;quot; Height=&amp;quot;20&amp;quot;&amp;gt;
    &amp;lt;FlowPanel&amp;gt;
    &amp;lt;Canvas Button.VerticalAlignment=&amp;quot;Center&amp;quot;&amp;gt;
      &amp;lt;Ellipse Width=&amp;quot;20&amp;quot; Height=&amp;quot;20&amp;quot; CenterX=&amp;quot;10&amp;quot; CenterY=&amp;quot;10&amp;quot; Fill=&amp;quot;Yellow&amp;quot; Stroke=&amp;quot;Black&amp;quot;/&amp;gt;
      &amp;lt;Ellipse RadiusX=&amp;quot;2&amp;quot; RadiusY=&amp;quot;2&amp;quot; CenterX=&amp;quot;7&amp;quot; CenterY=&amp;quot;8&amp;quot; Fill=&amp;quot;Black&amp;quot;/&amp;gt;
      &amp;lt;Ellipse RadiusX=&amp;quot;2&amp;quot; RadiusY=&amp;quot;2&amp;quot; CenterX=&amp;quot;14&amp;quot; CenterY=&amp;quot;8&amp;quot; Fill=&amp;quot;Black&amp;quot;/&amp;gt;
      &amp;lt;Path Stroke=&amp;quot;Black&amp;quot; Data=&amp;quot;M4,12 C 4,18 16,18 16,12&amp;quot;/&amp;gt;
    &amp;lt;/Canvas&amp;gt;
      &amp;lt;Text Height=&amp;quot;20&amp;quot; Margin=&amp;quot;5,0,0,0&amp;quot;&amp;gt;Click me!&amp;lt;/Text&amp;gt;
    &amp;lt;/FlowPanel&amp;gt;
  &amp;lt;/Button&amp;gt;
&amp;lt;/Canvas&amp;gt;
&lt;/pre&gt;

&lt;p&gt;This makes the content of the button a FlowPanel, which allows us to embed arbitrary flowing content inside the button. In this case we have two elements: a Canvas and some Text.  The Canvas in turn contains some markup to draw a smiley face onto the button.  So you're not restricted to just using bitmaps if you want to draw graphics on your buttons.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Fri, 07 Nov 2003 10:15:08 PST</pubDate>
	</item>	<item>
                <title>Full Trust for Page Functions?</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/appcore/overviews/appmodel_pagefunctions2.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;This page makes the following rather remarkable claim:&lt;/p&gt;

&lt;blockquote&gt;&quot;Because page-function applications depend on reflection, they must run with full trust.&quot;&lt;/blockquote&gt;

&lt;p&gt;If this were true, then surely you would never want to use page functions - requiring full trust instantly makes deployment much harder.  But apart from the fact that requiring full trust for something as basic as navigation would be really bad, there are other reasons to doubt this claim.  Why do page function applications depend on reflection?  Certainly none of the example code on this page uses reflection.  (Maybe Avalon uses reflection internally to make page functions work, but that doesn't require &lt;b&gt;my&lt;/b&gt; application to have full trust.)  And even then, use of reflection doesn't require full trust - partially-trusted code can reflect against public members.  And reflection against private members only requires the appropriate flag to be enabled on the SecurityPermission, rather than requiring full trust.&lt;/p&gt;

&lt;p&gt;So it seems implausible.  I really hope it's untrue.  (I would say that I hoped it was just a typo, but it's clearly more than that - there are three paragraphs and two XML fragments devoted to the subject!)&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Fri, 24 Oct 2003 02:35:05 PST</pubDate>
	</item>	<item>
                <title>PageFunctions and Generics</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/appcore/overviews/appmodel_pagefunctions2.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;PageFunction is the base class of the various type-specific page function classes such as StringPageFunction or BoolPageFunction.  The documentation implies that you should use these derived classes, and that using the base class directly is not supported.  However, the compiler tells another story.  If you try to use one of the derived classes, the compiler issues a warning telling you that the class is obsolete, and that you should use PageFunction instead!&lt;/p&gt;

&lt;p&gt;PageFunction is a generic class.  This means that if your language supports generics, there is no need for the specific derived types. For example, in C#, rather than using the StringPageFunction, you can just use PageFunction&lt;string&gt;.  You could even use your own custom type, e.g. PageFunction&lt;SomeCustomClass&gt;, although it's not clear how you would map this into markup.&lt;/p&gt;

&lt;p&gt;In trying to get the example on this page running, I've could only get it to work by using the generics-based event handling.  The example here uses this (non-generics-based) code to attach an event handler:&lt;/p&gt;

&lt;pre&gt;
next.NonGenericReturn += new StringReturnEventHandler(task1_Return);
&lt;/pre&gt;

&lt;p&gt;When I try this, task1_Return does not get called when the page returns. However, if I write the generic equivalent:&lt;/p&gt;

&lt;pre&gt;
next.Return += new ReturnEventHandler&lt;string&gt; (task1_Return);
&lt;/pre&gt;

&lt;p&gt;and modify the event handler method to use generics too:&lt;/p&gt;

&lt;pre&gt;
public void task1_Return(object sender, ReturnArgs&lt;string&gt; e)
{
    task1Return.TextRange.Text = e.Result;
}
&lt;/pre&gt;

&lt;p&gt;I find that my event handler now gets called correctly.  So from this, it would appear that the compiler warnings tell us the right way to go: use generics here.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Fri, 24 Oct 2003 02:34:52 PST</pubDate>
	</item>	<item>
                <title>Different Trees?</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/core/overviews/tree.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;This page implies that the Generic Logical Tree and the Logical Tree are two different trees.  This is potentially confusing, because in either case you are accessing the exact same nodes.  A Logical Tree is technically not the same tree simply because it is usually a subset of the whole Generic Logical tree, but it is helpful to be aware that these are really just two different ways of accessing the same objects.&lt;/p&gt;

&lt;p&gt;For example, consider the Text element in the example on this page that displays the Generic Logical Tree.  (The first example in the &quot;Using the Generic Logical Tree&quot; section.)  The Text class derives from FrameworkElement, and FrameworkElement implements ILogicalTreeNode.  So when you get hold of the ILogicalTreeNode implementation that represents the Text element, it's really an object of type Text.  Moreover, it's the very same Text object you would have got using the Logical Tree.  It's easy to verify this.  We can add some code in the loop inside the FindIt method, modifying the innermost if block so that it looks like this:&lt;/p&gt;

&lt;pre&gt;
if(childNode != null)
{
  Elements = Elements + &quot;\n&quot; + childNode.GetType();
  // ADDED CODE: see if this is the same node as we can
  // get from the Logical Tree
  if (object.ReferenceEquals(childNode, Text1))
  {
    Elements += &quot; (exact same object reference as Text1 in logical tree)&quot;;
  }
  // END OF ADDED CODE.
  FindIt(childNode);
}
&lt;/pre&gt;

&lt;p&gt;This modified version of FindIt checks each node it finds in the Generic Logical Tree, using the object.ReferenceEquals method to find out whether this is the exact same object as the Text1 node in the Logical Tree.  Lo and behold, when we run it we get this output:&lt;/p&gt;

&lt;pre&gt;
List of Logical Elements on page:
MSAvalon.Windows.Controls.Text (exact same object reference as Text1 in logical tree)
MSAvalon.Windows.Controls.DockPanel
...
&lt;/pre&gt;

&lt;p&gt;The object representing the Text node in the Generic Logical Tree is the same object that represents the same Text node in the logical tree.  The only difference is whether we use it via its concrete class interface, or the generic ILogicalTreeNode interface.  So when this page talks about the Generic Logical Tree, it is describing the use of the generic ILogicalTreeNode interface to access the tree nodes.  When it talks about the Logical Tree, it means the use of the concrete element-specific class interfaces to access the very same tree nodes.&lt;/p&gt;

&lt;p&gt;This page also mentions the Visual Tree.  So is that a different tree?  FrameworkElement derives from Visual, so everything in the Logical Tree is by definition also in the Visual Tree.  However, it is possible for the Visual Tree to contain Visuals which are not in the Logical Tree.  So it's not quite the same - some nodes in the Visual tree may not feature in the Logical Trees, but any object in a Logical Tree will also be in the Visual Tree.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:54:57 PST</pubDate>
	</item>	<item>
                <title>Commands Don't Work in Markup</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows.controls/c/menuitem/p/command.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;If you try to set this Command property on a MenuItem in markup, it doesn't seem to work.  (At least not if you're building your markup.  If you just run the XAML file directly it seems to be OK.  However, you can only run XAML files directly if they contains no code.  If you're building menu items, you will need some code behind them if they're going to do anything useful, so this property is effectively unusable in XAML.)&lt;/p&gt;

&lt;p&gt;If you try to set a Command attribute you get the error &quot;TypeConverter cannot converted from System.String&quot;.  The reason turns out to be that although the Command class itself does have a TypeConverterAttribute applied to it, the attribute isn't quite right.  (TypeConverters are used to convert from one representation to another - in this case they are being used to convert from the text value of the attribute stored in the XAML to a real Command object.)  So if you try to obtain the TypeConverter for a Command (using TypeDescriptor.GetConverter) you get back a generic base TypeConverter rather than CommandConverter, which is what you're supposed to get here.  The base TypeConverter doesn't know what to do here, and throws an exception.&lt;/p&gt;

&lt;p&gt;Because this is a problem with the Command class, it applies to &lt;b&gt;any&lt;/b&gt; property of type Command.  So not only do the Samples that attempt to use the MenuItem's Command property fail at runtime, so will anything else that tries to use Command, such as the CommandLink property of the UIElement class.&lt;/p&gt;

&lt;p&gt;The current workaround is not to try and use the Command architecture. (So the whole MSAvalon.Windows.Commands namespace is pretty much off limits...)  You can instead handle low level events like Click.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:54:38 PST</pubDate>
	</item>	<item>
                <title>Applicability of attr="{resname}" Syntax</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/core/overviews/resources.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;Something that wasn't obvious to me from the documentation was whether this attribute=&quot;{resourceName}&quot; syntax could be applied to any attribute, or whether it was something that only certain attribute types recognize.  It looks like this is universally applicable.  The markup compiler appears to convert this into the following code:&lt;/p&gt;

&lt;pre&gt;
element.SetResourceReference(WhicheverProperty, &quot;resourceName&quot;);
&lt;/pre&gt;

&lt;p&gt;('WhicheverProperty' will be the public static member defining the property being set. For example, if you set the Text property of a SimpleText element, this will be MSAvalon.Windows.Controls.SimpleText.TextProperty.)  This causes the value to be set at runtime to whatever that resource's value is.&lt;/p&gt; </description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:53:05 PST</pubDate>
	</item>	<item>
                <title>Scope of Resources</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com//lhsdk/core/overviews/resources.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;The examples on this page all show resources being used within the same markup tree in which they are defined.  However, it doesn't have to be this way.  A resource reference of the form &amp;lt;SomeElement SomeAttr=&amp;quot;{resourceName}&amp;quot;/&amp;gt; can look in several places for the definition of the 'resourceName' resource.&lt;/p&gt;

&lt;p&gt;Avalon will look for the resource definition closest in scope to the reference.  So if the element referring to some resource 'foo' defines the 'foo' resource in its own Resources, this will override any other definitions.  But since resource definitions are usually employed to allow reuse of markup, it is more normal for the resource to be defined in some containing element.  Avalon therefore walks its way up the element tree until it finds the relevant definition.  For example:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;FlowPanel xmlns=&amp;quot;http://schemas.microsoft.com/2003/xaml/&amp;quot;
  xmlns:def=&amp;quot;Definition&amp;quot;&amp;gt;

  &amp;lt;FlowPanel.Resources&amp;gt;
    &amp;lt;Style def:Name=&amp;quot;MyStyle&amp;quot;&amp;gt;
      &amp;lt;SimpleText Foreground=&amp;quot;Red&amp;quot;/&amp;gt;
    &amp;lt;/Style&amp;gt;
  &amp;lt;/FlowPanel.Resources&amp;gt;

  &amp;lt;SimpleText Style=&amp;quot;{MyStyle}&amp;quot; Text=&amp;quot;Hello&amp;quot;&amp;gt;
    &amp;lt;SimpleText.Resources&amp;gt;
      &amp;lt;Style def:Name=&amp;quot;MyStyle&amp;quot;&amp;gt;
        &amp;lt;SimpleText Foreground=&amp;quot;Yellow&amp;quot;/&amp;gt;
      &amp;lt;/Style&amp;gt;
    &amp;lt;/SimpleText.Resources&amp;gt;
  &amp;lt;/SimpleText&amp;gt;
  &amp;lt;SimpleText Style=&amp;quot;{MyStyle}&amp;quot; Text=&amp;quot;World&amp;quot;&amp;gt;

&amp;lt;/FlowPanel&amp;gt;
&lt;/pre&gt;

&lt;p&gt;Here, the first &amp;lt;SimpleText&amp;gt; element refers to 'MyStyle', but also defines MyStyle, so it will come out as yellow text.  But the second element, which also refers to 'MyStyle', does not have resources of its own. This means that it picks up the definition of this style supplied by its ancestor element, the &amp;lt;FlowPanel&amp;gt;.&lt;/p&gt;

&lt;p&gt;But what if there were a reference to a style not defined anywhere in the markup, e.g. 'MyOtherStyle'?  In this case, since Avalon cannot find the resource in this markup file, it will look to see if there are any application resources of that name - these are resources defined in the markup for the main application markup file.  Finally, if it cannot find the resource in either the markup or the main application, it will consult the SystemResources, which contains global resources determined by the selected system theme.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:52:26 PST</pubDate>
	</item>	<item>
                <title>Types of Resources</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows/c/frameworkelement/p/resources.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;Many of the examples with resources in markup use Style elements for the resources.  But there are also examples showing things like brushes.  This made me wonder: what kinds of elements are you allowed to use as resources?  Are there any restrictions, or is anything fair game?&lt;/p&gt;

&lt;p&gt;The FrameworkElement.Resources property is of type ResourceDictionary, which derives from Hashtable.  A Hashtable entry can have anything as its value, so if you write code to populate the Resources, you really can put anything in there.  This made me wonder if you could put, say, a String in there in markup.  It turns out that you can, although just using &amp;lt;String&amp;gt; doesn't work - this is not a recognised XAML element. However, by adding a Mapping processing instruction to associate an XML namespace with a .NET namespace and assembly, we can use the System.String type as a resource:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;?Mapping XmlNamespace=&amp;quot;sys&amp;quot; ClrNamespace=&amp;quot;System&amp;quot; Assembly=&amp;quot;mscorlib&amp;quot;?&amp;gt;

&amp;lt;FlowPanel xmlns=&amp;quot;http://schemas.microsoft.com/2003/xaml/&amp;quot;
  xmlns:sys=&amp;quot;sys&amp;quot;
  xmlns:def=&amp;quot;Definition&amp;quot;&amp;gt;

  &amp;lt;FlowPanel.Resources&amp;gt;
    &amp;lt;sys:String def:Name=&amp;quot;TextInRes&amp;quot;&amp;gt;This is some text in a resource&amp;lt;/sys:String&amp;gt;
  &amp;lt;/FlowPanel.Resources&amp;gt;

  &amp;lt;SimpleText Text=&amp;quot;{TextInRes}&amp;quot;/&amp;gt;

&amp;lt;/FlowPanel&amp;gt;
&lt;/pre&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:51:50 PST</pubDate>
	</item>	<item>
                <title>The rest of the gallery</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/layout/overviews/layout_gallery.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;I expect this will be fixed sooner or later, but at time of writing this, the page contains a single XAML example.  This example doesn't work on its own - it's just one page from an application.  To see this in action, you will need to build the 'Layout Style Gallery (&quot;XAML&quot;)' example in the Samples section of the documentation.  The XAML shown here is just the 'chrome.xaml' page from that sample.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:50:32 PST</pubDate>
	</item>	<item>
                <title>Margins, Borders, and Padding</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows/c/frameworkelement/p/margin.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;If you are familiar with the CSS2 formatting model from HTML, you may be wondering if you achieve the same padding, border, and margin effects that HTML offers in XAML.  At first glance it looks like you can't.  This Margin property works in the same way as a CSS2 - it determines the amount of space left around sides of the element - but what about the border and the padding?  In HTML it is possible to get an outline (or 'border') drawn around an element, and to specifiy the space (or 'padding') between the border and the content.&lt;/p&gt;

&lt;p&gt;It is entirely possible to achieve this effect with XAML.  There is a Border element you can wrap around any other element.  For example:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;Border Margin=&amp;quot;5,5,5,5&amp;quot; BorderBrush=&amp;quot;Blue&amp;quot; BorderThickness=&amp;quot;2&amp;quot;&amp;gt;
  &amp;lt;Text Margin=&amp;quot;3,3,3,3&amp;quot;&gt;I'm in a box.&amp;lt;/Text&amp;gt;
&amp;lt;/Border&amp;gt;
&lt;/pre&gt;

&lt;p&gt;This displays the text &quot;I'm in a box&quot; inside a blue border.  It has a 5 pixel margin around the border, and 3 pixels of padding between the border and the content.  Although this style requires two elements rather than one, it is conceptually slightly simpler than the HTML equivalent because there is no need for two seperate concepts of padding and margin.  There is simply the margin around the content, and the margin around the border.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:50:22 PST</pubDate>
	</item>	<item>
                <title>Can we also have a TryAccess please?</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.threading/c/uicontext/m/access.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;I like this kind of thing - it enables me to get the compiler to write my finally blocks for me, which is a Good Thing.  I like my code to be uncluttered.&lt;/p&gt;

&lt;p&gt;Unfortunately, this suffers from the same problem that has long annoyed me with the C# lock construct - it provides no way of passing in a timeout.  I'm always loath to write production code that waits indefinitely for anything.  So I never use the lock keyword in production code.  In fact I usually end up writing a small utility class with a method that looks just like this method, but which locks the object you pass in using Monitor.TryEnter.  I throw an exception if the timeout expires.  It would be really nice to have the same thing here - we have both Enter and TryEnter, so since we have Access, can't we also have TryAccess?&lt;/p&gt;

&lt;p&gt;Of course some would argue that indicating a timeout via an exception is a misuse of exceptions.  In some situations, yes it would be, but there are plenty of situations where you can say &quot;If I have to wait as long as a minute for this, something is badly wrong somewhere&quot;, and throwing an exception would be an appropriate thing to do.  You could just make it return null instead, but that tends to end up looking messy, and isn't really appropriate in the case where a timeout really does indicate a problem&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:49:48 PST</pubDate>
	</item>	<item>
                <title>Prefer Access to Enter</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.threading/c/uicontext/m/enter.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;If you ever Enter a UIContext, you will of course need to make absolutely sure that you leave it again when you're done.  You could of course do this by writing a try ... finally block, and calling Exit on the context in the finally block.  But in C# it's much easier to use the UIContext.Access method instead.  That returns an IDisposable object which exits the context in its Dispose method.  This means you can just do this:&lt;/p&gt;

&lt;pre&gt;
using(someUIContextObj.Context.Access())
{
  ... use the UIContextObj ...
} // UIContext.Exit() called here automatically
&lt;/pre&gt;

&lt;p&gt;and the C# compiler will generate the finally block for you.  Of course it just calls Dispose on the object that Access() returned, but that object in turn leaves the context for you.&lt;/p&gt;
</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:49:11 PST</pubDate>
	</item>	<item>
                <title>Responsibility for Checking UIContext</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.threading/c/uicontextobject/uicontextobject.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;By deriving from UIContextObject, a class advertises the fact that it does not support multithreading, and must always be accessed from a particular context. This is good because it makes explicit something that was not immediately obvious in Windows Forms.  Windows Forms controls always had to be accessed from the thread on which they were created; getting this wrong caused subtle and hard to find problems. Lots of people got this wrong.&lt;/p&gt;

&lt;p&gt;What's not immediately obvious is who is responsible for entering and leaving the context, and for detecting attempts to call from the wrong context.  Callers should ensure they are in the right context, but UIContextObject-derived objects are required to perform the check by calling Context.VerifyAccess() on themselves.  This call will raise a UIContextAccessException if the caller is in the wrong context, making it instantly obvious that something is wrong.  (Much better than in Windows Forms, where the results of such an error are usually much more subtle.)&lt;/p&gt;

&lt;p&gt;If you are familiar with ContextBoundObject, it's particularly important to note that UIContextObject works &lt;b&gt;differently&lt;/b&gt;. While calls into a ContextBoundObject would automatically be intercepted and delivered into the correct context, this does &lt;b&gt;not&lt;/b&gt; happen here - the caller is responsible for making sure they're in the right context before making the call.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:47:49 PST</pubDate>
	</item>	<item>
                <title>MIL</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/LHSDK/graphicsmm/overviews/wvg1.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;This article talks about the CS_MIL style for making Avalon functionality available in a window from Win32.  I had seen the abbreviation MIL dotted around the documentation and wondered what it meant. Sometimes Avalon is refered to as Avalon MIL in the documentation.  Some interface and type names have MIL in them.  The PresentationCore assembly manifest has a reference to a milcore.dll, which appears to have a friend called MILRender.dll.&lt;/p&gt;

&lt;p&gt;It appears to stand for Media Integration Layer.  This term is not explicitly defined anywhere, but as far as I can tell, it seems to be the name for the new display technology in Avalon.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Fri, 10 Oct 2003 08:50:06 PST</pubDate>
	</item>	<item>
                <title>XAML Available After Compilation?</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/appcore/overviews/appmodel_life_cycle.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;A question occurred to me while looking at the way XAML-based applications are put together, and the way in which navigation between pages occurs: is the XAML stored somewhere in the compiled application, so that it's available at runtime?  Superficially, it looks like it might be - you can refer to your XAML pages by name and navigate to them, for example.&lt;/p&gt;

&lt;p&gt;However, digging around with ILDASM, it looks like XAML does not survive the compilation process.  It gets converted into code that builds an object tree that reflects what was in the XAML, as this article describes.  What is not immediately obvious from the article is that XAML source itself is long gone at runtime.  The only reason you can navigate to a Uri that refers to the XAML file by name is that the build environment adds a special ResourceLoader class to your project and registers this with System.Resources.ResourceLoaderService. This resource 'loader' simply contains a switch statement that returns an instance of class corresponding to the XAML filename you pass in.  So although your code may refer to, say, &quot;MyPage.xaml&quot;, at runtime you only ever get an instance of the class for the page - you won't be able to get the original XAML itself.&lt;/p&gt;

&lt;p&gt;Those who are concerned about their intellectual property being ripped off will presumably be happy about this.  If the XAML were available, that would make it very easy to nab someone elses UI design, just as is often done today with HTML.  Having said that, it is possible to use the XamlRootSerializer class to generate an XAML representation of the runtime logical tree.  But this is not the same as the original XAML - it seems to be a lot more verbose and hard to read.&lt;/p&gt;

&lt;p&gt;Of course it does make me wonder: can I generate XAML at runtime and display it?  For example, could I get some XML from SQL Server and run it through XSLT to build a page?  It looks like the classes in MSAvalon.Windows.Serialization could be used for this (Parser in particular), but I've not tried this yet.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:45:21 PST</pubDate>
	</item>	<item>
                <title>Application vs NavigationApplication</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/appcore/overviews/appmodel_navigation2.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;It would be easy to get the impression that unless you are sticking to raw procedural code, you will always want to use the NavigationApplication class rather than its base, Application.  After all, this MSDN entry says that NavigationApplication &quot;provides support for navigation&quot;.&lt;/p&gt;

&lt;p&gt;But using NavigationApplication turns out not to be a prerequisite. You can write a custom application class that derives directly from Application, and still use XAML navigation. Your app.xaml file's main element will be Application instead of NavigationApplication, and you'll need to provide an implementation of the custom application class in a codebehind file.  You lose certain features: global navigation events, the application Properties collection, and the StartupUri property.  (So you'll need to override OnStartingUp and open a window in there if you want anything to appear when your program is launched.)&lt;/p&gt;

&lt;p&gt;However, programmatic navigation carries on working, as does the HyperLink element. So apparently the NavigationApplication is not central to an application's ability to support navigation operations. It just supplies some extra functionality that you might find useful if you're using navigation in your application.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:45:07 PST</pubDate>
	</item>	<item>
                <title>Application Properties</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/appcore/overviews/appmodel_appobject2.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;As this section describes, NavigationApplication allows application-wide values to be stored in its Properties member.  For some reason, this useful facility is not available on the base class, Application.  This means that if you write a base application, deriving your own application class directly from Application, it won't have the Properties collection.&lt;/p&gt;

&lt;p&gt;This is easily fixed, of course. NavigationApplication.Properties appears to be a simple Hashtable, so you can just add your own equivalent property to your custom Application-derived class. Even so, it seems like it would have been easier if the base Application supplied this - that way there would be no need to cast Application.Current simply in order access application-wide properties.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:42:50 PST</pubDate>
	</item>	<item>
                <title>Animation Properties</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/LHSDK/graphicsmm/overviews/animation1_ovw.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;Something is unclear to me: some animatable properties have corresponding animation properties.  For example, RotateTransform has an Angle property, and it also has an AngleAnimations property.  Where such an animation property is present, you're supposed to use it.  But not all properties have such animation counterparts. For those that don't you can often still animate the property by just setting an appropriate AnimationCollection as the value of the property.&lt;/p&gt;

&lt;p&gt;What is the difference between these two styles?  Why do some properties use one, and some the other?  What would happen if I were to use the wrong one, e.g. apply an animation collection to the Angle property rather than the AngleAnimations property?  Empirically, the answer appears to be: it doesn't work.  But why?&lt;/p&gt;

&lt;p&gt;The only reason the text seems to offer for this is that where animation properties are available, they are less verbose - you are allowed to omit the containing animation collection.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:41:48 PST</pubDate>
	</item>	<item>
                <title>Rotate Anything</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/graphicsmm/tasks/rotate.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;My favorite thing about the TransformDecorator is that you can use it to rotate &lt;b&gt;anything&lt;/b&gt; - it's not limited to rotating vector graphics drawn in WVG. For example, you can do this:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;TransformDecorator AffectsLayout=&quot;false&quot;&amp;gt;
  &amp;lt;TransformDecorator.Transform&amp;gt;
    &amp;lt;RotateTransform Angle=&quot;30&quot; /&amp;gt;
  &amp;lt;/TransformDecorator.Transform&amp;gt;

  &amp;lt;FlowPanel&amp;gt;
    &amp;lt;SimpleText&amp;gt;Hello, world&amp;lt;/SimpleText&amp;gt;
    &amp;lt;TextBox Text=&quot;Hello&quot; Height=&quot;30&quot;/&amp;gt;
    &amp;lt;Button&amp;gt;Click me!&amp;lt;/Button&amp;gt;
  &amp;lt;/FlowPanel&amp;gt;
&amp;lt;/TransformDecorator&amp;gt;
&lt;/pre&gt;

&lt;p&gt;This displays some text, a text entry field, and a button, all rotated by 30 degrees.&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:41:53 PST</pubDate>
	</item>	<item>
                <title>ImageBrush Content Mapping</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows.media/c/imagebrush/imagebrush.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;If the behavior you want from your ImageBrush is the obvious and straightforward effect that the image fills the area that the brush is being used to paint, then life is easy:&lt;/p&gt;

&lt;pre&gt;
  &amp;lt;Rectangle RectangleWidth=&quot;200&quot; RectangleHeight=&quot;200&quot;&amp;gt;
    &amp;lt;Rectangle.Fill&amp;gt;
      &amp;lt;ImageBrush ImageSource=&quot;Pic.bmp&quot; TileMode=&quot;Tile&quot;/&amp;gt;
    &amp;lt;/Rectangle.Fill&amp;gt;
  &amp;lt;/Rectangle&amp;gt;
&lt;/pre&gt;

&lt;p&gt;This will cause the bitmap to fill the rectangle. But what if you want to take more control? Maybe you want to control the aspect ratio of the scaling, or perhaps you don't want to show the entire original image. Maybe you'd like to tile the image.&lt;/p&gt;

&lt;p&gt;To do any of these things, you must be aware of five properties:&lt;/p&gt;

&lt;table&gt;
  &lt;tr&gt;&lt;th&gt;Property&lt;/th&gt;&lt;th&gt;Usage&lt;/th&gt;&lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;ViewBox&lt;/td&gt;
    &lt;td&gt;This selects a part of the source image. This will be mapped into the ViewPort.&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;SizeViewBoxToContent&lt;/td&gt;
    &lt;td&gt;You &lt;b&gt;must&lt;/b&gt; set this to false if you set ViewBox, otherwise ViewBox settings are ignored and the whole source image will be used.&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;ViewPort&lt;/td&gt;
    &lt;td&gt;This is the area on screen onto which the ViewBox will be mapped. (Defaults to the brush's entire bounding rectangle.)&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;ViewPortUnits&lt;/td&gt;
    &lt;td&gt;Determines the units used for the ViewPort. By default, these range from 0 to 1 across the bounding rectangle of the brush, but you can specify Absolute here to indicate that the ViewPort is specified in absolute units.&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Tile&lt;/td&gt;
    &lt;td&gt;Allows tiling to be used. (This only makes any sense if your ViewPort does not completely enclose the brush bounding rectangle.) Note that if you enable tiling, the repetitions occur across the &lt;b&gt;whole&lt;/b&gt; source image, rather than the portion of the source image selected by the ViewBox - when tiling is enabled, the ViewBox and ViewPort are simply used to work out the transformation that will be applied to the source image.&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:41:31 PST</pubDate>
	</item>	<item>
                <title>Relative Widths</title>
		<description>&lt;a href="http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/msavalon.windows/c/frameworkelement/p/width.aspx" &gt;&lt;/a&gt;&lt;a href="http://www.oreilly.com/"&gt;&lt;img src="http://www.oreillynet.com/images/oreilly_logo.gif" alt="O&apos;Reilly and Associates, Inc." width="74" height="19" hspace="3" vspace="3" border="0" align="right" /&gt;&lt;/a&gt;&lt;p&gt;Certain layout styles require a lot of developer effort on Windows Forms, or older technologies like VB6 and MFC. Although Windows Forms offers more support here than its predecessors, it cannot automatically resize elements in proportion to the size of their container.  
(The classic example is a table - if you wish to have a table which fills the available width, but which preserves the relative widths of each column, you have to write your own layout code in Windows Forms.)&lt;/p&gt;

&lt;p&gt;In Longhorn, it's much easier. A FrameworkElement's Width property is of type Length. As well as supporting absolute widths, you can specify the width as a percentage of the containing element's width, e.g.:&lt;/p&gt;

&lt;pre&gt;
&amp;lt;Text Width=&quot;20%&quot;&amp;gt;Hello, world.  This is a text element&amp;lt;/Text&amp;gt;
&lt;/pre&gt;

&lt;p&gt;This will ensure that this text element is 20% of the width of its container. The same technique may be used on the Height property. (You can also combine the techniques, e.g. an element may have a relative Width and an absolute Height.)&lt;/p&gt;</description>
		<link></link>
                <dc:creator>Ian Griffiths, O&apos;Reilly &amp; Associates, Inc.</dc:creator>
                <pubDate>Thu, 23 Oct 2003 05:46:53 PST</pubDate>
	</item></channel>
</rss>
