The Wayback Machine - https://web.archive.org/web/20160630083226/http://www.alexhopmann.com/category/technology/wpf/
6th July 2007

Posts about Silverlight on Launch21.com

I’ve got some posts about experiences with Silverlight over on Launch21.com.

posted in Developers, Technology, WPF | 0 Comments

1st February 2007

WPF- New Feb WPF/E Build available

A new build of WPF/E is now available from here (Windows, Mac). The old one accidentally expired so Microsoft rushed out the update. Tim Sneath has
all of the details on his blog
.
I’ll be working to fix up the demos on here with the new build shortly.
FYI, this new build is apparently good until June 1st.

posted in WPF | 0 Comments

13th December 2006

WPF- Upcoming conferences

Mike Taulty has posted
a cool sample of playing 12 video streams at once
and animating them
using WPF/E. It looks like there is a bug on Windows where the videos aren’t caching property so it looks
like the video is being downloaded 12 seperate times. The Mac doesn’t have the same issue but the video playback
and especially the animation are not nearly as smooth (despite my Mac having a slightly faster CPU than the PC).

It looks like both MIX07
and the Microsoft PDC have been scheduled for 2007. I’ve added them both to my
calendar of technology events on CalendarData.com. At the moment I’m more likely to go to Mix than
the PDC, but we will see when it gets a bit closer. I’m already planning on being in Palm Springs for
Coachella
2007
the night before so flying down to Vegas is just a short hop.

]]>

posted in WPF | 0 Comments

6th December 2006

WPF- WPF/E More Questions

The main set of questions that stand out with WPF/E at the moment is to figure out just what is missing (and what will be missing when the final version ships). One of the nice aspects is the install is smaller, and it runs on Macs, etc. But it doesn’t
appear to use the same high fidelity text engine and all that that the full WPF does. The real WPF isn’t a strict superset of WPF/E, to run without the CLR and on other platforms I suspect that its actually a completely different implementation. It would be nice if, on machines where full WPF exists you automatically got the benefits of full WPF, and the WPF/E engine only ran when its not there.
But I guess this brings us to one of the slightly confusing parts of the wonderful Microsoft technology naming. WPF/E isn’t really that similar to WPF. It’s a different engine, a different runtime model, etc. Hopefully they share some of the same rendering code, but mostly from a programming point of view the only thing they share is the ability to specify things in XAML. Even there, you window up using the http://schemas.microsoft.com/client/2007 namespace for WPF/E and the http://schemas.microsoft.com/winfx/2006/xaml namespace for WPF (and some of the later namespace is used for WPF/E also).
What this means is that you can create a XAML file for WPF/E. Double click it in the explorer and it will open in IE, and WPF will try to render it, but fail. Presumably this is a minor inconsistency that Microsoft can fix (although its not clear if that can be fixed in the final 1.0 version of WPF/E or if it needs to wait for a new version of .NET or if its just something you can work around in authoring your XAML).
It is clear that it is still early days for this stuff. WPF/E doesn’t even have a textbox yet. Presumably that is a key thing for them to add before they ship version 1. In the end I’m VERY glad that Microsoft choose to get this out into the community so we could start working with it at such an early stage- it looks like yet another sign of a more responsive Microsoft.
On another front, I’d point out that the support for media that is in the existing build is critical. So many of the scenarios where people want to embed richer content involve media, and this is one of the most common uses of flash around the web. The notion that this is a runtime where I can just play WMV and WMA on any browser any where and that its much easier to construct those players than with flash will be a critical strategic advantage for Microsoft.
On another front, I’m working on some tools to report to Google analytics how many of your users have WPF/E installed vs. not. It seems like it will be very interesting to track what percentage of my audience already has it when they come to my web-sites. I’ve created a small JavaScript function that detects the browser, platform and whether or not WPF/E is installed.
function GetWPFEStatus()
{
var Status = "WPFE-";
var Installed = false;

if((navigator.appVersion.indexOf('MSIE') != -1))
{
	Status += "IE-";
	try
	{
		var TheWPFE = new ActiveXObject("AgControl.AgControl.0.8");
		if(TheWPFE)
			Installed = true;
	}
	catch(e)
	{
	}
}
else
{
	try
	{
		if((window.GeckoActiveXObject && navigator.userAgent.indexOf('Windows') != -1))
			Status += "FF-WIN-";
		else if(navigator.userAgent.indexOf("Macintosh") != -1)
			Status += "MAC-";
		else if(navigator.userAgent.indexOf("Linux") != -1)
			Status += "LINUX-";
		else
			Status += "UNK-";
		for (var i=0; i < ; i++)
{
}

You can then wire this in to your Google Analytics reporting like this-

__utmSetVar(GetWPFEStatus());
_uacct = "-your-code-here-";
urchinTracker();

Yesterday’s technique to animate the text rotation was a good
exercise in talking to WPF/E with Javascript, but not really the
most efficient way to do an animation in WPF/E. Today I’ve got
an update that uses the built in animation objects. One interesting
point is that while the built-in technique is more efficient, it
isn’t necessarily more clear in the code…

posted in WPF | 0 Comments

5th December 2006

WPF- WPF/E Hello World

From 2001-2005 I worked on the Avalon team (now called WPF) creating the next generation user-interface and graphics
platform. One of the more disappointing things about leaving in 2005 is that the things I’d been working
on where not ready for prime time yet, and it would be years before it would make sense to really dive in
again for real-world projects. The other issue is just that the size of the platform (huge download) and
big app model changes (Avalon/WPF is mostly code-first so existing web-sites would need to be really rethought
to adopt it.

Yesterday Microsoft put the community preview of WPF/E (E is for Everywhere). They took the core graphics
concepts of Avalon, the XAML language and packaged it in a 1MB download, with an object model designed to work
inside web pages and be programmed from Javascript. Even better it works in Firefox and on the Mac. This is a huge
breakthrough- a 1MB download really isn’t that big of a deal and the broad platform support (hopefully Linux?)
and consistent programming model makes it way easier to buy in to the technology.

Without further delay, here is my first “Hello World” thing in WPF/E. Just a little rotating text on a
gradient, but doing this with existing browser platforms would have been a big pain.

Note- this probably won’t work in most blog readers, if you want to check it out, visit my site. If
WPF/E is not already installed it should take you to the download site. Downloads are available for Windows
and the Mac.

var TheWPF= new agHost(“wpfeControl1Host”, // hostElementID (HTML element to put WPF/E
// ActiveX control inside of — usually a

)
“wpfobj”, // ID of the WPF/E ActiveX control we create
“300″, // Width
“300″, // Height
“#ffB42600″, // Background color
null, // SourceElement (name of script tag containing xaml)
“helloworld.xaml”, // Source file
“false”, // IsWindowless
“24″, // MaxFrameRate
null); // OnError handler (method name — no quotes)

var CurAngle = 0;

function DoTick()
{
wpf = document.getElementById(“wpfobj”);
var rotate = wpf.findName(“RotateID”);

// Determine whether the object was found.
if (rotate != null) {
rotate.Angle = (++CurAngle);
}
window.setTimeout(“DoTick()”, 50);
}

function onHelloWorldLoaded(sender, eventArgs)
{
window.setTimeout(“DoTick()”, 50);
}

Here is the XAML used in this sample:


 
  
    
      
      
      
      
    
  



    
    
    
    Hello, world


And here is the Javascript:


// aghost.js is a library from Microsoft for constructing a WPF/E object on all browsers

var TheWPF= new agHost("wpfeControl1Host", // hostElementID (HTML element to put WPF/E // ActiveX control inside of -- usually a
) "wpfobj", // ID of the WPF/E ActiveX control we create "300", // Width "300", // Height "#ffB42600", // Background color null, // SourceElement (name of script tag containing xaml) "helloworld.xaml", // Source file "false", // IsWindowless "24", // MaxFrameRate null); // OnError handler (method name -- no quotes) var CurAngle = 0; function DoTick() { wpf = document.getElementById("wpfobj"); var rotate = wpf.findName("RotateID"); // Determine whether the object was found. if (rotate != null) { rotate.Angle = (++CurAngle); } window.setTimeout("DoTick()", 50); } function onHelloWorldLoaded(sender, eventArgs) { window.setTimeout("DoTick()", 50); }

]]>

posted in WPF | 0 Comments

  • Advertising

  • Calendar

  • June 2016
    S M T W T F S
    « May    
     1234
    567891011
    12131415161718
    19202122232425
    2627282930  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.