New Customer Feedback Program at Microsoft

Microsoft has announced an exciting new initiative, a customer feedback program that allows folks like us to interact directly with the developers and let them know just how we feel. Rory Blyth wrote a really good post on the things that are wrong with Windows, and all I can say is “Amen and pass the crunchy peanut butter!” Read his post at http://www.neopoleon.com/home/blogs/neo/archive/2007/08/24/26758.aspx and see if you don’t feel like saying exactly the same thing.

Anyway, if you want to learn more about the new program from Microsoft, go to http://www.microsoft.com/emea/itsshowtime/sessionh.aspx?videoid=9999 and click the “See a Preview” link.

Rumor has it that Scott Hanselman, Microsoft’s newest employee will be the very first developer they will be trying this on.

Arcane Stuff

Stepping away from WPF for a brief moment to pass along some interesting tidbits. First, there’s a new blog at Microsoft, the hackers blog. Should be interesting reading for those interested in security.

http://blogs.msdn.com/hackers/

Next, if you are one of the few people in the universe who has not yet heard, Scott Hanselman’s incredibly useful list of tools for 2007 is up.

http://www.hanselman.com/blog/ScottHanselmans2007UltimateDeveloperAndPowerUsersToolListForWindows.aspx

The Alabama Code Camp, which is scheduled for October 6th, has had it’s site updated. Note, it’s done in Silverlight, so you’ll need the latest Silverlight plug in to see it. (Don’t worry, the site will prompt you, quick and painless.)

You should also note there’s going to be a Silverlight Game contest. Design your own Silverlight game and you could win a Zune! See the site for details.

http://www.alabamacodecamp.com/

Finally, there’s an interesting looking conference going on in Nashville on October 12th and 13th called DevLink. They have some really big name speakers, with a really low admission. I’m planning on going, so maybe I’ll see you there!

http://www.devlink.net/

Stacking the deck with the WPF StackPanel

Yesterday we dove into the grid, in all likelihood it will be the container you’ll use the most. There’s another container control however that’s very popular, the StackPanel. You will often see the StackPanel used in demos because of it’s simplicity. It’s also used frequently for nesting controls inside another control.

Many controls have a contents property. The contents properties typically can hold only one thing, however that one thing can be a StackPanel, which in turn can house multiple items.

In Visual Studio, either start a new Windows WPF Project, or simply add a new Window (make sure to pick “Add New Item”, then “Window (WPF)”, if you had picked “Add New Windows Form” you’d have gotten and old fashioned WinForm) to the current sample we were using yesterday. Also, to make this the startup form, open the App.xaml file and change the startupuri to the new form:

  <Application x:Class=WPFSample001.App

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

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

      StartupUri=Window2.xaml

    >

    <Application.Resources>

    </Application.Resources>

  </Application>

You can see I changed mine to Window2.xaml. OK, back to the Window2.xaml file.

In the XAML area remove the <Grid> tags and add the following code:

  <StackPanel>

    <Button>Here’s a Button</Button>

    <TextBlock HorizontalAlignment=Center Background=Red>Hello There</TextBlock>

    <TextBox>A Text Box</TextBox>

    <CheckBox>Check Me!</CheckBox>

    <Button>One More Button</Button>

  </StackPanel>

What you will see is the controls stacked in a vertical fashion:

 [Picture of StackPanel in Action]

The StackPanel only has one real property with fiddling with, that’s the Orientation. By default Orientation is Vertical, however you can set it to Horizontal thusly:

  <StackPanel Orientation=Horizontal>

 

When you do, you’ll see this (well, once you resize the window a tad to be able to see everything):

[Picture of StackPanel with Horizontal layout] 

This would be useful if you wanted to create a status bar, or row of action buttons in your app.

I said the Orientation property was the main one you’ll be adjusting, however there is one more you may need, although probably not often. That’s the margin property. In the example below I set the margin to 20 so you can easily see the effect.

  <StackPanel Margin=20 Orientation=Horizontal>

[Picture of StackPanel with Margin of 20] 

You may, however want things oriented a bit differently. The StackPanel lacks an easy way to do this, however we can achieve a rotated text effect using the RenderTransform method of the various controls. Take a look:

[Picture of StackPanel with Rotated Text] 

Here’s the source (with the Window tags omitted):

  <Window x:Class=WPFSample001.Window2

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

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

      Title=WPFSample001 Height=152 Width=400

    >

    <StackPanel Orientation=Horizontal>

      <Button RenderTransformOrigin=0.5,0.5>

        <Button.RenderTransform>

          <RotateTransform  Angle=270 />

        </Button.RenderTransform>

        Here’s a Button

      </Button>

      <TextBlock RenderTransformOrigin=0.5,0.5 VerticalAlignment=Center Background=Red>

        <TextBlock.RenderTransform>

          <RotateTransform Angle=90 />

        </TextBlock.RenderTransform>

        Hello There

      </TextBlock>

      <TextBox>A Text Box</TextBox>

      <CheckBox>Check Me!</CheckBox>

      <Button>

        <TextBlock RenderTransformOrigin=0.5,0.5 VerticalAlignment=Center HorizontalAlignment=Center>

          <TextBlock.RenderTransform>

            <RotateTransform Angle=270 />

          </TextBlock.RenderTransform>

          One More Button

        </TextBlock>

      </Button>

    </StackPanel>

  </Window>

What I especially want to point out are the two buttons. In the first button, “Here’s a Button”, I applied the RenderTransform to the entire button. When I did this, WPF flipped the button on it’s side, but did not resize it. Instead, it left it at the default size the StackPanel had come up with. Not pretty, certainly not desireable for your app.

The solution then, is to do what I did for button two, the “One More Button” button. I replaced the contents with a TextBlock. I then used the same RenderTransform technique I had done with the “Hello There” TextBlock to flip the text on it’s side. Now it looks like the buttons text is flipped sideways, but the button retains the correct sizing.

The StackPanel will be an often used tool in your arsenal. Indeed, from what I have seen it may be THE most used WPF control in your kit.

Grid yourself… it’s WPF

It’s time to begin building a WPF Window. First though, we need to know something about the controls. In most cases you don’t want to place your controls directly on the window. Instead you want to use a container control that will help you group controls and arrange their placement.

While there are several, the most common of the containers is the Grid. It’s so common, both Visual Studio and the Expressions tool use the Grid as the default. Remember the project from yesterday? Take a look at the Xaml window (note you can click on most of these images to get a larger view):

[Picture of WPF Base Code]

With the Grid, you can simply drop several controls, such as buttons into it, or code them:

[Picture of two buttons]

Above you can see I dropped two buttons. In order to manage the placement of the second button, a “Margin” property was added to specify where WPF should place the button. A better way, however, might be to divide the grid into rows and columns. Then in the button declaration you specify which row / column to place the button in.

[Picture of Grid laid out]

Here we define the number of rows in the <Grid.RowDefinitions> area. As you see there are three rows defined. The column definitions are defined likewise, using <Grid.ColumnDefinitions>. Note the dotted blue lines Visual Studio thoughtfully drew on our window, to indicate where our grid lies.

Inside the Button tag, you see I indicated the row / column to put the button by using Grid.Row and Grid.Column syntax. Note that the numbering is zero based.

There are some simple ways you can enhance the grid’s usability. For example, let’s say button1’s Width was 150, and not 75. The resulting window looks like this:

[Picture of... hey who stole my button!]

See how the button is cut off (look where the arrow is pointing). There’s an easy way to fix this however. To the button, add Grid.ColumnSpan=“2”. And thus the problem is fixed!

[Picture of... oh wait, I found the button, it was with that missing sock from the dryer.]

While there’s a lot more we can do with the grid, there’s one thing left for today to discuss. Sizing of the rows and columns.

The height / width is established in the Definitions area. There are three ways to define a height / width. The first is automatic, and you simply set Height=”Auto” (or width) and WPF will take care of sizing for you.

The second way is absolute. With absolute, you simply give a number which represents the number of pixels. Width=”100” sets it to 100 pixels.

The final method is proportional. Unlike ASP.Net, which used percentages, WPF uses an * (asterisk). When only one row (or column) is set to *, that row (or column) takes up all the remaining space. When multiple rows (or columns) have an *, the remaining space is divided evenly between those rows (or… yes, you guessed it, columns).

Finally, you can affix a multiplier to the * . If, for example, one column was 2*, and the other two columns were set to *, the first column would be twice as wide as the others. Let’s look at a quick example…

[Picture of proportional columns]

Look closely at the dotted lines of the grid. You can see the center is twice as wide as the left and right columns. Note the multiplier can be a decimal as well, I could have specified 2.5* if I’d wanted. And, even though I did this sample with Columns, the same rules apply in the RowDefinition area.

Personally, I really love this * syntax. No more do I have to fiddle with trying to add up percentages or divide them. I simply use easy numbers to indicate how wide I want a column (or row) in relation to the others.

As I mentioned, there’s much more that can be done with the grid, but this covers a few nice basics that should get us started.

 

Update (29 Aug 2007): After looking at the post today, I realized some of the images could be a bit small. So here is the final XAML code in text format, in case you are interested:

  <Window x:Class=WPFSample001.Window1

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

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

      Title=WPFSample001 Height=99 Width=300

    >

    <Grid>

      <Grid.RowDefinitions>

        <RowDefinition></RowDefinition>

        <RowDefinition></RowDefinition>

        <RowDefinition></RowDefinition>

      </Grid.RowDefinitions>

      <Grid.ColumnDefinitions>

        <ColumnDefinition Width=*></ColumnDefinition>

        <ColumnDefinition Width=2*></ColumnDefinition>

        <ColumnDefinition Width=*></ColumnDefinition>

      </Grid.ColumnDefinitions>

      <TextBlock Grid.Column=0 Grid.Row=0 HorizontalAlignment=Center>Hi There</TextBlock>

      <Button Grid.ColumnSpan=2 Grid.Column=0 Grid.Row=2 Height=23 Width=150 HorizontalAlignment=Left Name=button1 VerticalAlignment=Top >Button</Button>

      <Button  Grid.Column=2 Grid.Row=2 Height=23 Width=75 HorizontalAlignment=Left Name=button2 VerticalAlignment=Top>2</Button>

    </Grid>

  </Window>

Starting a WPF Project

Head colds are nasty things. Yeah, I know folks like Scott Hanselman and Jeff Atwood say we shouldn’t talk much about ourselves, but I offer this as explanation for dropping off the face of the earth last week. A nasty head cold, followed by busy work week and my houses air conditioning dying in the middle of an Alabama triple digit heat wave… well something had to give.

But hey, odds are you’re not hear to offer your chicken soup recipe, but find out about WPF. So let’s kick this week off by starting a WPF project. Assuming you followed my instructions in my last post ( http://arcanecode.wordpress.com/2007/08/20/installing-the-wpf-bits/ ), you now have all the bits installed. Open Visual Studio 2005, and create a new project.

In your “New Project” window, navigate down to the “NET Framework 3.0” branch. In the templates area you see some new ones. One, WCF Service Library, is for creating Windows Communication Services projects and is outside the scope of this discussion.

The other three are WPF oriented projects. Windows Application (WPF) is for creating general windows applications using WPF. This is what you’ll probably use the most, and what we’ll pick for today’s demo. I named mine WPFSample001, as you can see above.

Before you click OK, let me just mention the other two. Custom Control Library (WPF) is analogus to it’s “old fashioned” WinForms counterpart. It lets you create a custom control comprised of WPF pieces for use in WPF Windows projects.

XAML Browser Application (WPF) is used to create a WPF App that will run inside a browser. Note this isn’t Silverlight. This is more like a Click Once deployment that opens the app inside the browser. MSDN (Sep 2007) had a good example of one you can see for yourself at http://ttpdownload.bl.uk/browserapp.xbap .

OK, that covers the various WPF project types. For today, we’ve decided on a standard WPF Windows Application, so click OK as you see in the screen above.

Let’s take a quick tour of what you see. Over on the left is the Toolbox. Under Common Controls, we see some with names look familiar. Button, CheckBox, Lable, etc. These are the WPF versions of the old Windows Forms controls. There are some new controls too, such as the DockPanel, the StackPanel, and a Grid which is unlike any Grid you’ve used in the past. We’ll get into these as time goes by.

Over on the right, in the Solution Explorer you see the Files that make our WPF project. App.xaml (and it’s corresponding App.xaml.cs) is the starting point for our Windows WPF app. Here you can respond to events like application starting and stopping, or you can blissfully ignore it.

The Window1.xaml is your main focus now, since it’s where you can do all your work. If you look at the center pane, you’ll notice it’s a bit different from traditional Windows Forms or even ASP.Net designer, in that it gives you the nice split screen. Changes in one are reflected in the other.

If you don’t like the split, you can modify it by either moving the mouse in the middle area and adjusting where the spit occurs, or manipulate it using the controls on the right side of the tab area:

The left most button flips the split from the default horizontal to a vertical one, nice if you have a really wide screen monitor. The middle button returns the split to the default horizontal orientation. The right most button removes the split all together, putting two tabs at the bottom (one for designer, one for xaml), not unlike the experience you get today when designing ASP.Net html pages.

Before I close out today, I want to mention that the designer tool under 2005 is not fully baked. You will see a lot of “whoops” screens appear. In addition, control placement is more like the ASP.Net experience than WinForms. As such, most folks I’ve seen so far prefer to type the XAML code directly in.

To start with I’ll be doing just that, typing in the XAML which will help me learn the behind the scenes syntax. Later I’ll shift to using the Expression Blend tool as the main XAML designer.

This is a good start, tomorrow we’ll pick up with creating a simple XAML app.

Installing the WPF Bits

OK, looking back I’m thinking my instructions last week for getting to the WPF bits installed were a tad confusing, so I’m going to give it one more shot.

Step 1 – Install .Net 3.0.

If you’re already on Vista, skip this step. If you are on XP, you can download .Net 3.0 from: http://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en . Make sure your XP has been patched with Service Pack 2.

Step 2 – Have a copy of Visual Studio.

If you have Visual Studio already, skip this step. If not, you can grab an express edition version at http://msdn2.microsoft.com/en-us/express/default.aspx . You’ll want to select Windows Development, and pick either C# or VB.Net.

Step 3 – The Windows Software Development Kit

The Windows SDK has lots of cool tools, what you are interested in is one called XAMLPad. You can find the SDK at: http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&displaylang=en . Even though it says Vista, the SDK will also install on XP with SP2, or Windows Server 2003.

Step 4 – Visual Studio extensions for WCF & WPF

Finally, you’ll want to install the Visual Studio extensions, these will allow you to create new projects for both the WCF and WPF. There are two prerequisites to installing the extensions. First, make sure you have the SDK (from Step 3) installed first. There are some bits in there the extensions need.

Second, all of the help for the extensions is local, so make sure you go into Visual Studio and set the help to “Local, then On-line”, other wise the installer will complain. OK, with those to prerequesites handled you’re ready to proceed.

Below is the website to download the extensions. Even though the title reads CTP, these are the latest (and final) bits you’ll see for this, Microsoft is putting all it’s efforts into Visual Studio 2008. You can get the extensions at http://www.microsoft.com/downloads/details.aspx?familyid=f54f5537-cc86-4bf5-ae44-f5a1e805680d&displaylang=en

Step 5 – Reboot

I generally find it a good idea to do a reboot after installing new bits, especially ones from Microsoft. After the reboot it might also be a good idea to run a Windows Update, just in case there are any security bits that need installing / updating.

Bonus Step – If you have an MSDN subscription, you should also download and install the Expression Blend tool, it will make your job of generating XAML much easier.

New version of CodeRush/RefactorPro

Just thought I’d take a short break from WPF to make you aware there has been a new release to that wonderful Visual Studio add-in CodeRush. The product has now broken the 100 refactorings mark!

You can read the announcement from DevExpress at http://www.devexpress.com/Home/Announces/CodeRush25.xml

If you are not familiar with DevExpress’ CodeRush/RefactorPro tools, you can read my original post at http://arcanecode.wordpress.com/2007/01/09/visual-studio-add-ins-coderush/

The new version already works with Visual Studio 2008. Talk about being on the ball, VS2008 is still in Beta and they’ve already got refactorings out there just for it!

The Brains of WPF

In yesterday’s demo, I gave instructions to add references to WindowsBase, PresentationCore, and PresentationFoundation. Today I thought we’d take a few minutes to talk about what these are and what they do.

Together these three DLLs make up the heart of Windows Presentation Foundation. WindowsBase defines most of the base types needed by WPF, and should always be included. PresentationCore builds on WindowsBase by providing the base types for most of the GUI components you’ll use. PresentationFoundation is the big animal on the block, he holds all of the WPF controls.

Now that you know the DLLs, let’s talk briefly about the namespaces you’ll encounter. System.Windows contains two core types, Application and Window. These are the two you’ll use as a platform to build your user interfaces on, and you’ll see them often.

The other one you saw yesterday was System.Windows.Controls. In here are all of the standard controls you might expect: button, label, textbox, checkbox, etc. Yesterday when you saw the XAML <Label> block, WPF renders that from the System.Windows.Controls namespace. By the way, you need to note that XAML, like C#, is case sensitive. So <Label> will work, but <label> and <LABEL> will not.

Over time there are some other children of System.Windows we’ll be seeing, such as Shapes (which, as you might guess holds standard shapes like rectangles and circles), Media (used for 3D and more), Document (for creating XPS files), and Markup which can be used to parse XAML.

We’ll dive deeper into all of these as time goes by, but I wanted to give you a brief introduction so you’d understand what bits belonged where in the WPF world, and why you need to include those references and using/import statements in your code.

Update to "Taking the WPF Plunge"

Just a quick note, I made two updates to Monday’s post on Taking the WPF Plunge (http://arcanecode.wordpress.com/2007/08/13/taking-the-wpf-plunge/), one clarified a point and the second added one more download item you may want. If you’ve already read it, please go take a quick look at the updates.

Arcane

WPF and XAML

XAML is the definition language most often used to define a WPF based user interface. Using XAML you can define sleek, modern and highly functional applications.

Most people talk about XAML and WPF interchangeably, but I feel I need to kick off our discussion with an important concept:

XAML != WPF

XAML and WPF are, in fact two separate things even if they are closely linked. XAML is a definition language, similar to HTML. Well, more like HTML, WINForms and XML collided together in a Mythbusters type of explosion, and XAML is the result.

XAML requires a framework to execute. Often that framework is WPF, but it’s not necessarily so. Internet Explorer can interpet and display a XAML page, as can tools like XamlPad. Take this simple example:

<Page xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221; xmlns:sys=”clr-namespace:System;assembly=mscorlib” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml&#8221; >
<Grid>
<Label>Welcome to ArcaneCode!</Label>
</Grid>
</Page>

Here you can see XamlPad displays the label in the upper part of the window:

clip_image002

No WPF, no compilation, no other magic, just the XAML Parser at work. You could save the code snippet above, and open it in Internet Explorer if you so wished.

Now let’s create another user interface, this time we’ll use WPF and NO XAML! Start a new project in Visual Studio, and pick BlankProject (note, do NOT pick Windows Project (WPF). We’ll use it later, but not today.)

Add references to three assemblies in the .Net tab: PresentationCore, PresentationFramework, and WindowsBase.

Now add a class, I named mine wpftest. Here’s my code:

using System;

using System.Collections.Generic;

using System.Text;

using System.Windows;

using System.Windows.Controls;

 

namespace wpf001

{

  class wpftest : Application

  {

    [STAThread]

    static void Main()

    {

      wpftest mytest = new wpftest();

      mytest.Startup += MyTestStartup;

      mytest.Run();

    }

 

    static void MyTestStartup(object sender, StartupEventArgs e)

    {

      arcaneWindow aw = new arcaneWindow();

      aw.Show();

    }

  }

}

Note the use of an arcaneWindow class, let’s create that now:

using System;

using System.Collections.Generic;

using System.Text;

using System.Windows;

using System.Windows.Controls;

 

namespace wpf001

{

  class arcaneWindow : Window

  {

    Label lblWelcome = new Label();

 

    public arcaneWindow()

    {

      this.Title = “Greetings!”;

      this.Width = 320;

      this.Height = 120;

 

      lblWelcome.Content = “Welcome to ArcaneCode!”;

      this.AddChild(lblWelcome);

    }

  }

}

Note the following things:

First, I’ve added two “using” lines, System.Windows and System.Windows.Controls. Next, I needed to create a new window (arcaneWindow) and inherit from the base Window type. Finally, I created a WPF label control, and added it to our window via AddChild.

Once you get all of it in, run the program and you should see:

clip_image003

There you go, you’ve just created a WPF user interface without a single line of XAML.

My point of this kick off was to demonstrate the difference between WPF and XAML. Most times, you will probably be using WPF and XAML in conjunction, but you don’t HAVE to.

In the coming days, we’ll delve a little deeper, and I’ll explain more of what some of the code you’ve seen today means.

WPF Resources

Yesterday I pointed out where to download all the bits you need to get into WPF. Today I thought I’d share some good resources on learning WPF.

First off is Todd Miranda’s site Xperimentality http://www.nxtdimension.com/blog/ . Todd is an MVP and has done many of the videos that appear on the Windows Client site.

Speaking of the WindowsClient.Net site, you can find many of those videos at http://windowsclient.net/learn/videos.aspx , just scroll down to the WPF area.

Todd Miranda’s videos on the Expression suite can be found on the Expression Knowledge Center site, http://www.microsoft.com/Expression/kc/resources.aspx?product=web&type=video . There are also videos by others.

Channel 9 has now reached 100 items on WPF: http://channel9.msdn.com/tags/WPF

Mark Miller recently did a DNRTV episode on Custom Controls in WPF, find it at http://www.dnrtv.com/default.aspx?showNum=72 . Also on DNRTV, Brian Noyes did a two parter on WPF, found here http://www.dnrtv.com/default.aspx?showNum=56 and here http://www.dnrtv.com/default.aspx?showNum=59 .

Another great blog is Lester’s WPF Blog, http://blogs.msdn.com/llobo/default.aspx . Lots of good stuff from the author of XAMLPadX, which I recommended yesterday.

Finally, a book recommendation, I’m finding Adam Nathan’s book on WPF to be a really good read. It’s more than technical enough to keep an experienced reading, and all of the code samples are in color! http://www.amazon.com/Windows-Presentation-Foundation-Unleashed-WPF/dp/0672328917/ref=pd_bbs_sr_1/103-4574773-3941455?ie=UTF8&s=books&qid=1187125352&sr=8-1

Taking the WPF Plunge

I wrote earlier that I felt WPF and XAML were the UI design platform of the future ( http://arcanecode.wordpress.com/2007/08/03/the-ui-of-the-future/ ). I’ve decided to put my time where my (some would say big) mouth is, and devote some time to learning WPF. In case you want to come along for the ride, lets look at what you need to get started.

First, you need the .Net Framework 3.0. Odds are you already have it, if you have Vista you definitely have it. If you are still on XP, and haven’t downloaded it grab your copy from http://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en . Make sure your XP has been patched with Service Pack 2.

That’s it, that’s all you have to have. However there are some things that will make your life easier. Visual Studio 2005, for example. Odds are if you read this blog you already have a version, but if not grab one from http://msdn2.microsoft.com/en-us/express/default.aspx . You’ll want to select Windows Development, and pick either C# or VB.Net.

Finally, you’ll want the Windows Software Development Kit. The Windows SDK contains a very useful tool called XamlPad, which you can use to quickly test your XAML code. The Vista version is at http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&displaylang=en . UPDATE (Aug 15): I should have been a little more awake when I wrote this. Even though the download has Vista in the title, the SDK will actually install and run on Windows XP (with SP2) and Server 2003 in addition to Vista.

If you’re on XP, or want something other than the SDK check out XamlPadX at http://blogs.msdn.com/llobo/archive/2007/04/23/update-xamlpadx-v2-1.aspx .

Finally, if you are lucky enough to have an MSDN Subscription, take a look at Expression Blend and Expression Web, I’ll be looking at them later.

There, that ought to keep you busy for a bit!

UPDATE UPDATE (Aug 16th)Well I did it again. When I posted the Aug 15th update (at the bottom) I grabbed the wrong text and pasted it in. Obviously, the Workflow Foundation extensions don’t do you any good when you want to work with WPF. Instead I meant to refer you to the extensions for WPF & WCF at http://www.microsoft.com/downloads/details.aspx?familyid=f54f5537-cc86-4bf5-ae44-f5a1e805680d&displaylang=en . Don’t let the fact that it reads CTP shake you, this is the last release for VS2005, Microsoft decided to make all further updates to the VS2008 product. The bits work fine though, and add templates so you can create WPF/WCF projects.

One note, when you go to install this extension, it will first recommend you have the Windows SDK (see link earlier in this message) installed. Second, it will recommend you set your help in Visual Studio 2005  to use local instead of on-line as the primary source. Just be aware of these two quirks.

I’ll leave the Workflow link below active though, it won’t hurt to install it, and you might want to dive into WF at some point.

UPDATE (Aug 15th): One more item you’ll want if you intend to use Visual Studio, you’ll want the Extensions for Windows Workflow Foundation, which you’ll find here http://www.microsoft.com/downloads/details.aspx?familyid=5D61409E-1FA3-48CF-8023-E8F38E709BA6&displaylang=en . (It’s only a 6 mb download, so it shouldn’t take long.)

Arcane Searching

I think we’d all agree the internet is one of the greatest productivity tools around, allowing us to find vast stores of information. I’m sure you’ve also heard it’s the greatest time waster, with lots of distracting sites or useless pages that get in the way of the results we want.

I find it really valuable to have a good search tool, one that focuses on the content I need, and limits the scope of the search to relevant areas. Of course we’ve all heard of Google, the 500 pound gorilla of search engines. While the do a pretty decent job, when your search phrase returns half a million hits it can be difficult to narrow down.

Recently I’ve found the Microsoft engine, Windows Live ( http://www.live.com/ ), has gotten a lot better, especially when looking for .Net related developer content.

My favorite so far though, is Search.Net ( http://searchdotnet.com/ ), a site put together by coding legend Dan Appleman. Dan ( http://www.desaware.com/ ) created a Google powered site, but maintains the list of sites it searches so you know that you are only combing sites devoted to programming and not Happy Harry’s House of Wild Women.

Another site I just learned about this week is Koders ( http://www.koders.com/ ). It’s a site devoted to searching through source code. It also has some helps that will let you zoom in on what you want. You can pick the language, or specify your search word needs to be in the class name, method name, or interface name. This kind of search is valuable when you are looking for an example, or trying to avoid reinventing the wheel.

A similar site is Krugle ( http://www.krugle.com/ ). It has similar paradigm to Koders, allowing you to search through code.

The final code search tool I’ll mention is Google’s new Code Search engine ( http://www.google.com/codesearch?hl=en ). It allows you to search using regular expression syntax, which is a nice feature (I just wish regular expressions weren’t such a pain in the underwear to use).

I have to give a quick thanks, most of these I learned about through either my listening of Dot Net Rocks ( http://www.dotnetrocks.com/ ) and HanselMinutes ( http://www.hanselminutes.com/ ) or through Scott Hanselman’s new forum site, which I blogged about yesterday.

Those are the list of place I go when I need to find something, how about you?

Arcane Links

Some miscellaneous topics to cover for today. First, I had the need to copy several thousand files from one machine to another, about 6 gigs worth. Explorer? No thanks, to slow and unreliable. Fortunately I had recalled reading a post on Scott Hanselman’s blog just the other day on this topic. http://www.hanselman.com/blog/XCopyConsideredHarmfulRobocopyOrXXCopyOrSyncBack.aspx

Since the machine I was using to do the copying was Vista, I used RoboCopy. Worked like a champ. The bad part was I didn’t even know I already had this tool until I’d read Scott’s post. Always nice when you go hunting for a tool only to discover you’ve already got it and it’s ready to go.


On the subject of SOA, Redmond Magazine released an article on Microsoft’s SOA strategy. http://redmondmag.com/features/article.asp?editorialsid=756

It was a long article and interesting, although it seemed to have an anti-Microsoft tone. I picked up a subtle, and perhaps condescending, knocking of Microsoft for not falling into lockstep with other industry players like IBM. While I do agree Microsoft sometimes comes a little late to the party, I don’t think it has to jump on the party boat to be an effective player in the industry.


Windows Communication Foundation Guru Jeff Barnes is planning on some new WCF posts in the near future, so be sure to keep an eye on his site if you play in the WCF realm. http://jeffbarnes.net/portal/blogs/jeff_barnes/archive/2007/08/08/coming-soon-wcf-3-5-posting-blitz.aspx

Jeff’s also working on a WCF Site (http://jeffbarnes.net/portal/blogs/jeff_barnes/archive/2007/08/06/planning-a-wcf-community-site.aspx), another good reason to keep an eye on his blog.


Finally, Scott Hanselman has opened up a forum area on his site, some good info and discussions can be found here. http://www.hanselman.com/forum/

Happy Programmers

According to the Secret Society of Happiness (http://www.sohp.com/) today, August 8th is National Happiness Day. It got me to wondering, as a developer or IT professional, what makes you happy?

For me it can be the little things. When I added a third monitor to my setup at work, I was happy.

When I get “that” problematic section of code working, I’m happy.

When I learn about a new .Net class and learn it’s in’s and outs, I’m happy.

When I get to learn some new tech, such as SOA (Service Oriented Architecture), I’m happy.

When I get to hang out with other geeks and get into really arcane conversations about the nuances of some technology, I’m happy.

When I’m driving down the road, with no accidents to block my way, listening to a new podcast, I’m happy.

Most of all though, is when I meet with a user to find his needs, then in a few hours can come up with a solution for him. To hear the user say “wow, I spent hours gathering that data every week, now I can get it in a matter of minutes. You’ve saved me hours of work.” That makes me happy.

What makes you happy?

As a side note, I also have to wonder, if it’s a “secret” society, why do they have a website?

Follow

Get every new post delivered to your Inbox.

Join 93 other followers