Last week the the February 2007 WPFe CTP shipped. If you play with the CTPs you get used to breaking changes between each CTP versions. The products are not stable and are still in flux so it’s not surprising that namespaces or class names change between drops.
There are a couple breaking changes in the February drop. Microsoft has posted a short article describing the two breaking changes. Unfortunately I think there is a mistake in the article. I updated the Game Of Life sample today to work with the new CTP and could not get it to work based on the syntax in the article. Using the code in the SDK samples worked correctly however.
Here are the relevant bits from the incorrect article (errors in red):
The February 2007 CTP agHost.js file has been updated significantly to:
- Check for installed major, minor, and build-version information of the control.
- Detect supported browser versions.
- Accept required major version, required minor version, and required build parameters to the agHost() function.
The new function signature is the following:function agHost(
This new agHost.js file creates two breaking changes that will require changes to Web sites that are built with “WPF/E”.
- The updated function signature contains new arguments: reqMajorVer, reqMinorVer, reqBuildVer. Each
- Major = 0
- Minor = 8
- Build = 5
So, to specify the February CTP as the required minimum version, you should pass ‘0’, ‘8’, ‘5’ for the reqMajorVer, reqMinorVer, reqBuildVer arguments, respectively.
- You must replace the December CTP SDK agHost.js file with the February CTP SDK agHost.js file, in order for your Web site to work with the February CTP runtime. The agHost.js file that was released with the December CTP was hard-coded to check for a previous version of “WPF/E” on the Microsoft Internet Explorer browser. Therefore, the December agHost.js cannot recognize the February CTP, and will continually point users to download the new version. Note also that the December CTP runtime will expire on February 18, 2007, and users must upgrade to the February CTP in order to continue viewing “WPF/E” content.
The new agHost.js file that ships with the February CTP now accepts a minimum version as a variable, and will be compatible with future versions of the “WPF/E” plug-in.
"wpfeControl", // ID of the WPF/E ActiveX control we create
"1024", // Width
"530", // Height
"black", // Background color
null, // SourceElement (name of script tag containing xaml)
"xaml/piano.xaml", // Source file
"false", // IsWindowless,
"24", // MaxFrameRate
null, // OnError handler (method name -- no quotes)
0, // Minimum major version required
8, // Minimum minor version required
5); // Minimum build required