Rory Primrose

Learn from my mistakes, you don't have time to make them yourself

View project on GitHub

Public Fields vs. Public Properties

Just came across this post in my feeds this morning. Interesting read.

I think there is a lack of consistency in implementations (event handlers being the classic case), but the contract/interface argument leans me towards always wrapping fields in properties. Using properties also means that you can change the code without having to change the structure of the class.

Any thoughts? Is Ian Cooper a witch? Should he be burnt at the stake? Is there a Monty Python take on this?

Read More

XBAP through a proxy server

I have just tried to view some XBAP applications using RC1 of [NetFx]. Unfortunately it didn’t go so well because I am sitting behind a proxy server. IE has it’s connection settings defined for how to go through the proxy, but it seems that the XBAP host isn’t doing the same. I am getting this error:

System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.

I have found some references (such as here and here) which mention changes to the machine.config, but this hasn’t solved the problem. Has anyone been able to get around this problem?

Read More

Visual Studio for Database Professionals

I am working on a personal project that I have wanted to do for quite a while. The project requires a database and I have been putting this part of the system together tonight. I remembered reading about the new edition of Visual Studio for Database Professionals that was blogged about the other month. I have decided to give this a run because I would like a full Visual Studio development experience as much as possible.

There are two major things that I would like to get out of this new project model. Firstly, version control for database objects. I will get the project onto CodePlex sometime soon so that should be a good test of its version control capabilities. Secondly, a good deployment (including upgrade) model.

Read More

Top guidelines violations

I just came across the Top Guidelines Violations document on MSDN. This is a great read to get pointers of what not to do with your UI designs and behaviours. It also includes some helpful suggestions as well.

I haven’t read it all yet, but the one that jumps out for me is the restarting progress bar. Hopefully Microsoft will learn from themselves because this is the thing in Windows Installer that annoys me the most. The progress bar restarts so many times and you never know what the progress actually is.

Read More

WPF UserControls can't be found by the Orcas IDE

I have created some WPF UserControls, but referencing them in XAML is causing grief in the VS IDE. If I have a UserControl that is in the applications assembly, I set up the namespace mapping with something like the following:

Read More

Navigating XBAP to a different page

Surprisingly, one of the first major problems I had with WPF was when I tried to figure out how to navigate to a new WPF page inside an XBAP application. Sure, there are a few controls which encapsulate this functionality (like the Frame and Hyperlink controls), but I wanted to fire a navigation from a button click or double click of a listbox item. I was researching the net for a day and a half and coming up empty.

Could it be this difficult? Should it be? The answer to these questions is no, but there just isn’t enough information out there because WPF is still and emerging technology that is not widely adopted (it’s still only just turned RC1 after all).

One of the bits of information I came across was from the MSDN Magazine. I found the following code sample a little suspect though:

Read More

Feeling the love

I just got a comment that I hadn’t posted about my first week in the new job and how great the people are here (People read my blog???). Well, this one’s for you Pants.

I’ve just started my second week. Last week I was introduced to a ton of great people. I experienced some desk hopping and the varied accuracy skills that people have with small soft balls. As mentioned previous, I have also been very privileged to be able to do some work with WPF which is a whole world of fun. Unfortunately I don’t have access to IM or GMail though (so no AusDotNet [:(]).

Read More

WPF - The beginning

In my new job, I have been tasked with the great opportunity of building a prototype application in WPF. The .Net 3.0 RC1 came out last weekend so I have been using these latest bits. It has been a very interesting experience getting my hands dirty with WPF, but it has been difficult for the last few days without VS integration. Thankfully, the extensions for VS2005 came out last night. Grab them here.

Read More