Rob Relyea

xaml:Blog

June 2005 - Posts

  • Avalon Express Applications vs. Avalon Applications

    Ashish has a nice write-up about Avalon Express applications vs. Avalon Installed applications.  He also covers using clickonce to deploy/update those applications.

    I'm curious to hear what you all think about Express applications...do you lean towards building Avalon applications that run in browser with partial trust?

    Have you run into any things that should (but don't) work in Express apps due to security restrictions?

    PostTypeIcon
    1,938 Views
  • Localization for Avalon XAML based applications

    Online Documentation for Beta1 RC Now Available

    After a few week delay, the online version of the documentation for Beta1 RC has finally made it up on MSDN.  Those of you using that build, had current documentation installed on your machine, but the online documentation was still showing March CTP docs.

    Localization and Globalization

    That makes it easier for me to point to 2 documents about localizing and globalizing avalon applications.  This topic came up recently when I did a presentation at XTech about Avalon and a XUL guy thought that Avalon/XAML didn't have a localization story because I didn't mention one in my talk.

    This overview article covers several globalization issues.

    I like our solution for localization, it allows people to use one primary language for development in their XAML.  When these XAML files are compiled into BAML files, they are embedded in satellite assemblies.  This how-to topic documents the steps necessary to localize the content in the baml and to create new satellite assemblies.

    Please tell me anything that isn't clear or doesn't make sense...

    New Article About Localization (10/19/2005)

    Globalize and Localize Your "Avalon" Applications Using LocBaml

    You already know that internationalizing your applications can propel you into new markets. But did you know that the Windows Presentation Framework can make it easier than ever to do? Learn how to write culture-aware WPF applications using this example. 

    http://www.devx.com/dotnet/Article/29407/

     

    10/19/2005 - updated 2 links that were broken since the sdk is still moving Urls around.

    PostTypeIcon
    3,266 Views
  • Matthew Adams ponderings on XAML

    Filed under: ,

    Interesting post on "Avalon, XAML as a discoverable API" by Matthew Adams.

    In the discoverable API piece, he ends with:

    But I don't think XAML quite delivers on that ease-of-use goal as it stands. I'm sure the intention is to build tooling around it for RAD development, and so maybe this doesn't register all that high on the radar, but it still doesn't feel as "clean" as it could, to me. Yet.

    We'd love to know which parts of Avalon/XAML need more cleaning.

    Yes, we clearly would benefit from visual designers, but we want to still be readable/writable without one.

     

    He also says:

    Avalon delivers an API which permits the same ease of use; in fact, I think it is more consistent, simpler and generally easier to use even than VB's API, as well as offering richer functionality even at its surface.

    Glad to hear about the richness and pleasantly surprised about the consistency, simplicity and ease of use you mention.  We still have a number of rough areas, but we've been working towards those goals.

    He has other posts on Avalon as well  "Bad practice, good practice, what is XAML for?"

    Please go read his posts and comment on them on his site.  Would love to know what you all think.

    PostTypeIcon
    3,271 Views
  • Beware warnings from the xml editor...avalon2005.xsd/xaml2005.xsd are not perfect way to validate xaml

    Filed under: ,

    This issue keeps coming up...

    When VS gives you a message like this:

    The element 'Page' in namespace 'http://schemas.microsoft.com/winfx/avalon/2005' has invalid child element 'Page.CommandBindings' in namespace 'http://schemas.microsoft.com/winfx/avalon/2005'. Expected 'Page.Resources, Page.StatusBarContent, Page.Storyboards, Page.Opacity, Page.Clip, Page.RenderTransform, Page.DataContext' in namespace 'http://schemas.microsoft.com/winfx/avalon/2005' as well as any element in namespace 'http://schemas.microsoft.com/winfx/xaml/2005' as well as …

    It is likely a warning, not an error.  The xml editor is warning that the xaml doesn't match the schema that we've provided for Avalon/Xaml.

    Back in February, I blogged about the Issues/Suggestions for November Avalon CTP's VS2005 Add-ons ('Fidalgo').  I've updated the relevant section and included it here:

    Avalon + XAML Schema Files
    The XML Editor in Visual Studio uses XSD schema files to provide Intellisense support for many XML formats. If you are editing an xml format and want a better experience, you can put an .xsd file in \program files\microsoft visual studio 8\xml\schemas\

    XSD Schema doesn't do a great job on XAML intellisense…but it is better that typing blind! The danger is that the schema isn't perfect. It complains about some syntaxes that are perfectly valid (according to the XAML loader and XAML compiler.) It also suggests some syntaxes which won't compile.

     

    Why doesn't XSD do a great job with XAML?

    Why is XSD inappropriate as a XAML validator:

    1) Type Inheritance - 3rd party types that subclass UIElement should be allowed in DockPanel.

    2) Generics - Generic collection type   List -- content model depends on T

     

    foo

    foo

     

    3) Attached Properties - AttachedProperties could be applied anywhere.  Should all attached properties be added to the schema for all UIElements?

     

    4) Attributes and Property Elements shouldn't both be set

     

    The parser/compiler will both error if you do this.  I'm not sure of way to enforce this with XSD.

       

            

                  ...

            

        

     

     

    5) PropertyElements must all be listed in the schema or they will appear invalid.

    I choose to not list every PropertyElement as a possible child of the ObjectElements today because they would provide too many options to insert as children of tags.  I've tried to find the common PropertyElements and add them to the schema.

    The solution

    Short term: tell us about bad problems in the xsd.  We'll fix most of those until we get our long term solution.

    Long term: we hope to have an editor that doesn't rely on XSD to provide intellisense.  If you are building tools that are targetting Avalon/Xaml, and want to learn more about what I'd recommend in this area, please contact me...I'd be happy to tell you what I believe would be the best way to do this.

    Update: I needed to hand escape all my tag examples...fixed them...

    PostTypeIcon
    3,388 Views