Welcome to WindowsClient.net | Sign in | Join

Rob Relyea - XAMLified

WPF, Silverlight and XAML

April 2008 - Posts

WPF Frameworks

Basically Prism is looking to address most of the same concerns that led to the development of the Composite UI Application Block (CAB) and the Smart Client Software Factory (SCSF). Specifically, if you have a large, complicated smart client application, particularly one developed by multiple (possibly distributed) teams, you can't afford to build it all into one big monolithic mass of UI code in a single or small number of top level windows and their code behind. You will need to modularize the application and compose the UI that the user sees out of smaller, more granular and well factored parts that are as decoupled as possible from one another, but come together to make the end result without an overly complex integration effort.

...

WPF Contests

WPF Tools

WPF How-To

WPF Controls

Silverlight

Microsoft

Ori Amiga shows a number of demos showing the native Mesh feeds, WPF applications using Mesh, a Silverlight client that supports working on and offline, a custom Facebook application that syncs Facebook photos with Live Mesh, a Mac client that sends photos to Live Mesh and even LINQ queries over Mesh objects

Browsing WindowsClient.Net's articles, I found Rudi Grobler's recent post that renders simple docx files as FlowDocuments: "OpenXML + FlowDocument = OpenFlowDocument?"  Nice use of Linq and extension methods as well.

Previous Web Links in this area

Posted by Rob_Relyea | with no comments

MSDN magazine included an interview of Bjarne Stroustrup on the Evolution of Languages.  Interesting to read his thoughts on DSLs:

HD You commented on your Web site, "I think we should look for elegance in the applications built, rather than in the languages themselves." Is the move toward domain specific languages (DSLs) a convergence of these?

BS Yes, almost certainly. It is often an attempt in that direction. Sometimes, it even works.

HD What are your thoughts on DSLs in general? What do you envision as the relationship between DSLs and general-purpose languages?

BS I worry about the number of languages being designed, implemented, introduced with great fanfare, and then fading away without significant impact. During this—typically many-years long phase of development—a new language consumes significant resources with essentially no returns. I wrote a paper on this phenomenon called "A Rationale for Semantically Enhanced Library Languages" (research.att.com/~bs/SELLrationale.pdf). I argue for using libraries, possibly supported by tools, and a general-purpose language.

I think that a DSL should be a last resort, not a first. If at all possible, the DSL should be firmly rooted in a general-purpose language and standard tool chains. A DSL needs a general-purpose language (or at least a systems programming language) for its implementation and the implementation of its run-time primitives. I think it would be best if a DSL is consciously and firmly paired with at least one general-purpose language so that it is easy to add new facilities through the use of libraries written in that general-purpose language. Obviously, a professional should master several languages, but I do wonder if the sum of complexity of a variety of DSLs couldn't become so high that it became a problem. Also, many (if not most) DSLs seem to "want to" become general-purpose languages

People should consider if XAML based DSLs make good sense for their file formats.  Don't invent a new language, build a new XAML Vocabulary, and be XAML based - like WPF, Silverlight, XPS, Workflow, etc...

Posted by Rob_Relyea | with no comments
Filed under:

Good question on the slickedit community forum about the best way to configure it to edit XAML.  In Visual Studio we chose to build a XAML Language Service to provide the editing support for XAML files, not reuse the XML Editor.

The way we did that was that the Language Service learned the rules of the language and how to get a Xaml Schema from a CLR Type.  [MS-XAML] describes the rules of XAML...we don't have a public spec or API yet on how to get XAML Schema from a clr type, but if you have questions, please contact me...

XSD for XAML History

Although for a few years (until we started shipping the XAML language service) we provided intellisense support for early WPF developers by providing an XSD.  That XSD had a few flaws, see a few previous posts on the XSD for XAML topic:

Posted by Rob_Relyea | with no comments
Filed under: ,

WPF Applications

WPF How-To

WPF Tools

Xaml for Config

File Format Converters

WPF Controls

  • MindScape released WPF Elements - "a suite of 12 essential line of business controls for WPF."

WPF Frameworks

WPF Blogging

Silverlight

Internal mail thread that may be useful...read bottom up...

From: A WPF Dev Lead

All RoutedEvents (including input events for mouse and keyboard messages) route both through the visual and the logical trees. Event routing happens in two phases

1. Building the route

2. Invoking the handlers

When building the route the base UIElement adds all the nodes in the visual tree to the route. The subtype FrameworkElement augments the route with nodes from the logical tree. As a result we route through both the visual and the logical tree nodes. Note that we do not have duplicate nodes in the route. Meaning that a node that is both in the visual and the logical tree will get added to the route but once.

From: MS Employee
Subject: Message routing internals

Hi,

Asking a very basic question here:

How are messages such as keyboard/input messages routed in UIElements?  I noticed that UIElements do not have logical children, whereas FrameworkElements do.

Are messages routed along the visual tree only?  Or is there some other mechanism?

Posted by Rob_Relyea | with no comments
Filed under:

Windows XP SP3 (Service Pack 3) is coming soon.  Users of WPF applications will find at least one fix there that improves the performance of Layered Windows on Windows XP.  So soon, instead of pointing your users to the hotfix at KB937106, you can just ask them to run SP3 or install the hotfix.

This Service Pack for XP still doesn't include .Net 3.*... :-(

Will link to the SP3 download when it becomes available...

Please comment if you find any other improvements that others should know about that help WPF apps.

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

Just noticed that Christian just started blogging @ ElectricBeach.org.  Interested in Blend and other related topics, please do subscribe.

 

Update: the title used to be:
    Bloggers.Add(Microsoft.Expression.Blend.GroupProgramManager, "Christian Schormann");
That "broke the UI", so WindowsClient had to change it...

Posted by Rob_Relyea | with no comments

In the .Net Framework 3.0 and later, when objects are created by loading XAML, we check to see if they implement ISupportInitialize and call BeginInit and EndInit on the instance before we set properties and after we are done setting properties.

Why would an object want to support ISupportInitialize?

  • Perhaps they want to get all their properties set before they validate them.  The EndInit call is a signal to do that validation.

Mike Hillberg describes a bit of the XAML and much more of the WPF side of things in Loaded Vs Initialized.

Misc Notes

  • WPF 3.* has a problem with firing BeginInit/EndInit twice on UserControls.  A WPF forum post brought to our attention the fact that we fire ISupportInitialize.BeginInit and .EndInit too often in WPF 3.*.  I detail a workaround (that you'll only want to use if you implement ISupportInitialize in your UserControl) in the forum post that should work fine, even after we fix this issue someday...
  • The only other interface that comes to mind that we will call on objects that are created is IUriContext.
Posted by Rob_Relyea | 3 comment(s)
Filed under:

[2 blogs ago (back on what is now windows-now.com), I blogged about the IE7 Search Bar + Open Search.  It continues to be something I get a lot of value from, so I thought I would reshare/update the post here]

I'm loving the work many of my former teammates (I was an IE PM working on DHTML's programmibility from IE5 to IE6) did on IE7.

Keyboard (or mouse) shortcuts I like:
ctrl-t - opens a new tab
ctrl-click on a link (opens in a new tab in the background)
ctrl-e, moves keyboard focus to the search box, type your term, then:
   1) enter to navigate the current tab
   2) alt-enter to navigate a new tab

ctrl-w, closes a tab
See more at the Keyboard Lover's Guide to IE7.

Search Providers
Adding search providers is nice: http://blogs.msdn.com/ie/archive/2005/09/14/466186.aspx

Search on this site

Navigate to a site with a <link /> tag pointing to information about their search, and it shows up in the drop down box next to search...

For instance...go to facebook.com and see how the drop down changes. (it changes color and adds some choices in the drop down...)

More Info

Posted by Rob_Relyea | with no comments
Filed under:

WPF Apps

WPF Controls

WPF How To

WPF Tools

Silverlight

WPF Blogging

Robby updated KaXaml (a powerful XamlPad like app) to include the ability to host a Silverlight tab!  Great stuff.

My feedback for Robby:

  • Silverlight tabs will eventually want to use the xaml/presentation namespace, not client/2007.  Cider and Blend are both going that way...the Silverlight runtime already supports it.
  • it is strange to by default change the way xaml files work on a machine...please don't take over open by default of Xaml files...they should load in IE
  • keep up the great work!
Posted by Rob_Relyea | 1 comment(s)
Filed under: , ,

Internal mail thread...read bottom to top...

 

From: MS Guy

I’m completely dumbfounded, but that works.  Thanks…

From: Rob Relyea

Templates are special beasts in 3.0/3.5.  We hope to enable this in the future…

I would try a ResourceDictionary with x:Class….

From: MS Guy
Subject: The attribute 'Class' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml'?

Try compiling a simple .xaml file consisting of:

<ControlTemplate xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

x:Class="MyTemplate">

<Button Click="Button_Click"/>

</ControlTemplate>

What’s up with this error?  Everyone uses x:Class where xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" on a daily basis.

Is there some other way of defining reusable templates with code behind?

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

Gizmodo.com discusses and shows a video of the now live AT&T store application running on Microsoft Surface.  Great to see WPF be part of this release!

I blogged earlier about Martin Jacobs discussion of their work on this application. Congrats!

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

Just got home from a dinner with MVPs who are in town for the MVP summit.  Had a bunch of good conversations...met up with a bunch of people I've known and several I hadn't met before.

Earlier today I did a few demos to a VB focused audience, tomorrow we'll be discussing WPF Futures...3.5 "servicing release" and beyond.

Ran into Scott Guthrie on the way out of the hotel, we hadn't talked at dinner at all. He paid less for his valet than I paid for my hotel parking structure...what is up with that?

Posted by Rob_Relyea | with no comments
Filed under: , ,
Next page »
Page view counter