04.29.07

Upcoming Presentation for the Central California .NET Users Group May 9

Posted in Presentations at 3:32 pm by Cal

On Wednesday, May 9 I will be making a presentation for the Central California .NET Users Group in Fresno.?

Here’s an outline for this presentation:

Windows Presentation Foundation is a new programming paradigm introduced in Version 3.0 of the .NET Framework as an alternative to traditional Windows Forms programming. WPF effectively permits the separation of user interface design (to be principally implemented by designers) from the underlying functionality (to be implemented by developers) using a new XML variant, XAML. WPF also permits almost any control to host any other control, thereby allowing dramatic user interface designs such as buttons hosting videos or 3D drawings. WPF also permits every control to be built in a scalable fashion so that an entire form — including buttons, graphics, labels, textboxes and the text which they contain — can be expanded or shrunken simply by dragging the sizing handle.

This presentation will attempt to clarify the following:
What is WPF?
How does WPF compare to Windows Forms Development?
Does WPF Require Windows Vista?
What are the Other Requirements of WPF?
What is XAML and how is it used by WPF?
What is WPF/E?
What is XBAP?
What are the Applications in the Expressions Suite?

For information about the location and other details, see the Central California .NET Users web site.

Upcoming Presentation at East Bay.NET (Pleasanton, CA) May 10

Posted in Presentations at 2:34 pm by Cal

Cal at Sacramento Presentation

I will be giving a presentation on Dependency Properties, Routed Events and WPF built-in Commands for East Bay.NET on May 10th.? Here’s a description of what I will be talking about.?

Windows Presentation Foundation is a new programming paradigm introduced in Version 3.0 of the .NET Framework as an alternative to traditional Windows Forms programming. WPF effectively permits the separation of user interface design (to be principally implemented by designers) from the underlying functionality (to be implemented by developers). WPF also permits great flexibility in designing dynamic user interfaces, for example, allowing almost complete scalability and flow control. As an illustration of this point, see the? Seattle Post-Intelligencer? NewsReader. Note how this application seamlessly scales, flows and repaginates — very impressive.

To implement these capabilities in WPF, Microsoft had to modify and supplement certain existing portions of the .NET Framework. In particular, the old method of independently setting the properties of each component object in a user interface had to be supplemented with a method of setting a property at one level and having that value penetrate down the element tree to propagate that value to various sub elements. When configured to achieve this goal, setting a new font size at the Window level can automatically and instantaneously change the font size of all controls hosted by the Window. This technology forms the basis of styling and animation in WPF.

This presentation will include a primer on why Windows Presentation Foundation is such an important new development along with an in-depth review of Dependency Properties and Routed Events — two of the most significant (and complex) technical areas of WPF. It will also include coverage of WPF built-in Commands which make use of Routed Events to provide amazing functionality with only a couple words of code.

If you are interested in attending you can register here.

04.28.07

Moving or Renaming an XBAP Application

Posted in XBAP at 10:57 am by Cal

One problem which can arise if you move an XBAP project or rename one of the folders in its path is that the application will no longer run in debug mode.? Compounding this problem is the fact that the output window is completely blank and doesn’t give you any clues as to what the potential cause of this problem is.?

To solve this problem turn to the Debug tab in project properties. The start action should already be set to your local instance of PresentationHost.exe. You should not change this since XBAPs require this document host in order to run in Internet Explorer.? Turn, however, to the command line arguments.? If you are like me, most likely you will not be able to see the entire value for this setting because the textbox is too small to accommodate it*.? I recommend copying this value to the clipboard and pasting it into Notepad (or any other handy text editor).? I expect that you will find that the path shown in this value will reflect the old location for your XBAP application and not the new one.? Simply modify this setting to accurately reflect the new path for your XBAP, paste it back into the inadequately sized textbox for this setting and your debugging capability should be restored.?

You can find an excellent summary of XBAP debugging at the Nerddawg blog.*

? One of my biggest pet peeves is keyhole programming — textboxes which are too small to fully display the entire string which they contain.? The authors of the XML standard have said that in the trade off between brevity and clarity, clarity should prevail 100% of the time.? In my opinion, in the trade off between appearance and functionality, functionality should win at least 99% of the time.?

04.27.07

WPF Job Tracker Weekly Update

Posted in Job Tracker at 8:50 am by Cal

Here are this week’s figures from Dice for progress in job postings for C# and WPF:

WPF All of Dice: 72
Silicon Valley: 2

Blend All of Dice: 0
Silicon Valley: 0

C# All of Dice: 7087
Silicon Valley: 239

WPF and C# jobs hold steady from last week with very little change.?

04.21.07

Introducing TravelsWithCal.com WPF Zone

Posted in XBAP at 8:09 pm by Cal

As indicated in a previous post, I recently developed a little XBAP application to display photos of Senegal (West Africa).? I started with the Felipe Fortes model and added a few minor embellishments — such as animating the images? in my list box.? You can see this application at TravelsWithCal.Com/wpfzone.?

You must use either Internet Explorer 6 or 7 and you must have Version 3.0 of the .NET Framework installed in order to view this XBAP application.

04.18.07

WPF Job Tracker Weekly Update

Posted in Job Tracker at 1:14 pm by Cal

Here are this week’s figures from Dice for progress in job postings for C# and WPF:

WPF All of Dice: 73
Silicon Valley: 4

Blend All of Dice: 0
Silicon Valley: 0

C# All of Dice: 6,990
Silicon Valley: 224

This week’s figures are only slightly changed from last week, representing a very modest improvement overall and a very slight decline in Silcon Valley (C# only — WPF steady). Obviously still much too early to discern any trend.

04.15.07

XBAP Deployments

Posted in Deployments, XBAP at 6:55 pm by Cal

Man -- Kaolack, Senegal, West Africa
Recently I made a little XBAP application to display photos of Senegal (West Africa) using the Filipe Fortes model. Since I would like for the public to be able to view this application from my website over the Internet, I decided to step through the process to deploy my XBAP application.

First, using Visual Studio, I published the application to an IIS Virtual Directory on my local computer. A brief test showed that just this step was not sufficient for me to view my app in any version of Internet Explorer.

Typically (as in my case) some minor configuration changes are required to IIS in order to successfully access an XBAP application. Microsoft has instructions for this on the MSDN website. Essentially there are just two steps: (1) Set Enable Content Expiration to one minute and (2) register a series of Mime types. For your convenience Microsoft has provided a .vbs script that will register the mime types for you automatically if you simply run it from a command window. As soon as I finished these two steps, I was able to successfully view my locally deployed XBAP application in both IE 6 and 7.

Next I uploaded my application (via FTP) to a Unix web server (running Apache) where we host some of our web content. I was pleasantly surprised to see that without any configuration changes I was able to see my application using IE 7. However, IE 6 showed me some XML text (as of course did Firefox) instead of the actual content of my application.

The documentation for our web server suggested using the AddType method in the httpd.conf file so I added the following lines to this file:

AddType application/manifest .manifest
AddType application/xaml+xml .xaml
AddType application/x-ms-application .application
AddType application/octet-stream .deploy
AddType application/x-ms-xbap .xbap
AddType application/vnd.ms-xpsdocument .xps

Then I uploaded the revised version of httpd.conf to my website and restarted Apache.

This solved the problem for IE 6, although Firefox still won’t display XBAP applications. However, I did have to close IE 6 and reopen it to flush its cache before it worked correctly.

Also, with the Mime types now registered, Firefox displays a download prompt instead of the contents of the manifest. Since downloading this file with Firefox is pointless, I decided to put a page in my website which explains the requirements of an XBAP application (Internet Explorer 6 or 7 and .NET 3.0) Instead of giving out a link directly to the XBAP application I will give people a link to my gatekeeper page from which they can then proceed to my XBAP applications. Anyone who doesn’t meet the requirements can simply download and install them before attempting to access my XBAPs. More importantly if anyone experiences a problem viewing any of my XBAPs, he will have an explanation of what is causing this problem and how to solve it.

04.13.07

What is XAML?

Posted in XAML at 1:42 am by Cal

The Huntress
Everyone starting out at the bottom of the learning curve (and that, of course, is all of us) faces the question at some time “What is XAML?” and where does it fit into the picture. Is it a replacement for HTML? (no) Is it a replacement for C# (no). Is it the Microsoft competition for Flash. (not per se — True, Microsoft is building something to compete with Flash and this something uses XAML but XAML by itself is not really competition for Flash).

In my opinion the best way to start visualizing XAML is to picture it as being a textual representation for some type of graphical content. Now graphical content can come in a lot of different forms but for XAML the two most important ones are vector graphics and user interface controls. So virtually any vector graphic image can have an equivalent XAML representation and similarly, almost any Windows application GUI can be constructed using XAML instead of C#.

To illustrate this point, I have put together a little webcast (four minutes) which illustrates taking a vector graphic file, converting it to XAML and then displaying the image from this XAML in XAMLPad. In the future, I plan to do another one of these webcasts to show how a given Winform GUI can be expressed both in C# and in XAML. Probably I will illustrate three different versions: C# 2.0, C# WPF and XAML in order to evaluate the advantages and disadvantages of each alternative.

To launch the What is XAML webcast click here.

Mike Swanson’s XAML Exporter for Adobe Illustrator is available here .

04.11.07

WPF Job Tracker Weekly Update

Posted in Job Tracker at 11:52 pm by Cal

Here are this week’s figures from Dice for progress in job postings for C# and WPF:

WPF All of Dice: 69
Silicon Valley: 4

Blend All of Dice: 0
Silicon Valley: 0

C# All of Dice: 6,921
Silicon Valley: 232

Now how to interpret it. Frankly that task is much to risky on just two weeks of data but WPF does look promising, up 21% overall and up by 50% in Silicon Valley. C# is up 4% overall but down 9% in Silicon Valley.

Meaningful? A trend? Hard to say. I think that the safe thing to do is to just let the data speak for itself for the next few weeks and hopefully then we can discern a trend if one appears.

04.04.07

Presentation at SD Forum (Windows SIG) in Palo Alto Tonight

Posted in Presentations at 11:48 am by Cal

Tonight I will be presenting at the SD Forum in Palo Alto with Peter Kellner . We will be discussing WPF for a group of professional Windows application developers. My responsibility will be to give an overview of the various tools which are available for creating WPF applications. These tools include XAMLPad (surprisingly useful for many simple WPF tasks), Expression Blend (critical for creating animations) and Visual Studio (critical for adding functionality).

For this presentation, I have a completely different set of demo applications to show from my other recent WPF presentations. Considering that there is such a wealth of cool WPF demos to choose from, it is hardly a burden to select an alternate set to illustrate almost any point.

Anyone interested in a copy of my Powerpoints is welcome to Email me.

Post-Meeting addendum:

Cal & Peter Kellner at SD Forum

I had a very enjoyable meeting tonight fielding many excellent questions on WPF. My portion of the presentation consisted primarily of a review of the tools for creating WPF applications (XAMLPad, Expression Blend and Visual Studio). Peter gave a brief introduction of WPF and XAML and then later showed a WPF/E application which he had written for the Silicon Valley Code Camp.

Many thanks to David Korn and Jean-Luc Brouillet for organizing such an excellent meeting.

« Previous entries