Sep 27 2006

Control adapters to the PNG rescue

Category: IT Related | .NetRory Primrose @ 03:52

I came across a post in the Code Project feed this morning called 'Using a Control Adapter to Properly Display PNG Images in IE' by Charles Windhausen. This is such a simple and very effective way around the PNG problem in IE. Fantastic idea.

Tags:

Sep 25 2006

Sneaky Athena

Category: Rory Primrose @ 04:08

I just read Geoff's post. Athena is blogging now (I didn't know either Geoff). She obviously wasn't satisfied with just one, so she has created two blogs. Even with two blogs, this was a very quiet entry to the blogsphere. Welcome to the club Athena. [:)]

Tags:

Sep 24 2006

Visual Studio for Database Professionals

Category: Rory Primrose @ 18:11

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. Deployment is going to be the really interesting thing for me. How is a database project going to be built/deployed and how will the new project model cater for updating a live database to a new version.

Within a couple of minutes of creating my database project, I imported an existing script. I was really impressed with this. The script I had was a script that created tables, constraints, relationships and triggers. The import wizard did a really good job of splitting the single script into separate database objects for the project.

All is not smooth sailing though. Already, the latest CTP has halted my machine a couple of times. Adding a table to the project and then viewing Solution Explorer was the latest culprit. But hey, that's what you get for playing with the CTP's [:)].

A couple of other minor issues that I have found so far are that trigger files are not related to the table in the Schema View window and you can't right click multiple files in Solution Explorer to get a context menu (I was trying to include multiple files after one of the aforementioned halts).

Tags:

Sep 24 2006

Starting young

Category: PersonalRory Primrose @ 17:46

As I indicated recently, my wife and I are having a baby. I wonder if Taekwondo is in its genes. This weekend, I felt the baby kicking for the first time. Very exciting!

Tags:

Sep 22 2006

The importance of comment spam

Category: IT RelatedRory Primrose @ 06:45

I've been getting hit with a steady flow of comment spam over the last month. I haven't previously had too much of a problem with it in the past and there have only been a couple of times where hundreds of entries have been made.

Two things come to mind about comment spam:

  1. I must be popular if spammers think that they will get worthwhile link juice from this site (please don't burst my bubble on this one [:)])
  2. Spammers are very persistent given that this site is moderated and their comments/trackbacks never go public

Tags:

Sep 22 2006

Top guidelines violations

Category: IT RelatedRory Primrose @ 03:57

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.

Tags:

Sep 18 2006

MCE is alive

Category: IT RelatedRory Primrose @ 17:19

Since I got an XBox360 after TechEd, I haven't been able to stream videos or live TV from my MCE 2005 box. As soon as I tried, it would give a second of sound and then MCE would lock up. From all the research that I did on the net, I could only find a couple of references to this happening to other people. The culprit seemed to be the network card.

It's hard to believe that a network card could be causing this problem. It seemed to be more and more likely though as the machine also locked up five times when I was transferring several gigabytes across the NIC one night.

The onboard NIC in the motherboard didn't work for me prior to this because it couldn't talk properly to my router. I had installed a spare PCI NIC that I had back from my BigPond ADSL (no link deserved [:P]) days.

With my research into the MCE issues, the solution seemed to be to get an updated set of drivers for the NIC. I found out that my 'no name' NIC only had drivers back to something like 2003 or 2002. Ok, so no good on that front.

Yesterday, I was out pram shopping and happened to end up next to Harris Technology (no seriously, it wasn't planned!). $30 later got me a Netgear GA3111. I wasn't holding a lot of hope on this as a solution, but I was very pleased when this new NIC worked with MCE straight away. Sweet!

Oh, and I also picked up a Valco TriMode from Baby Wombats for a good deal.

Tags:

Sep 12 2006

WPF book: Applications = Code + Markup

Category: IT Related | .NetRory Primrose @ 06:17

wpf book This morning I have been reading through Applications = Code + Markup by Charles Petzold. It is a good read with lots of details. I have found a small misprint though. Page x (as in page 10 of the introduction) says that the codes samples can be found at http://www.microsoft.com/mspress/companion/6-1957-3. This appears to be incorrect. The url to use is http://www.microsoft.com/mspress/companion/0-7356-1957-3/.

Tags:

Sep 12 2006

WPF UserControls can't be found by the Orcas IDE

Category: IT Related | .Net | ApplicationsRory Primrose @ 06:09

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:

<Page x:Class="XAMLBrowserApplication1.Page1"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="Page1"
      xmlns:stuff="clr-namespace:XAMLBrowserApplication1.Controls">
    <StackPanel>
        <TextBlock Text="my test" />
        <stuff:UserControl1 />
    </StackPanel>
</Page>

The IDE throws a wobbly saying Assembly '' was not found. The 'clr-namespace' URI refers to an assembly that is not referenced by the project. I haven't specified an assembly because the UserControl is in the same assembly as the XAML. This causes the control <stuff:UserControl1 /> to not be resolved which in turn makes the page invalid. Because the page is invalid, it can't be set as the StartupUri of the application. The application still runs, but I loose designer support.

Just to check, I created a control library project and created a UserControl in the external assembly. I added the control library as a reference to the application and updated the XAML to be the following:

<Page x:Class="XAMLBrowserApplication1.Page1"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="Page1"
      xmlns:stuff="clr-namespace:CustomControlLibrary1;assembly=CustomControlLibrary1">
    <StackPanel>
        <TextBlock Text="my test" />
        <stuff:UserControl1 />
    </StackPanel>
</Page>

Now the IDE throws a wobbly saying Assembly 'CustomControlLibrary1' was not found. The 'clr-namespace' URI refers to an assembly that is not referenced by the project.

Either this is a bug, or I am a complete nugget. I haven't been able to figure this one out for a few days. Does anyone have any answers for this?

Tags: ,

Sep 11 2006

Navigating XBAP to a different page

Category: IT Related | .NetRory Primrose @ 08:42

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:

void viewHyperlink_Click(object sender, RoutedEventArgs e)
{
    // View Order
    ViewOrderPage page = new ViewOrderPage(GetSelectedOrder());
    NavigationWindow window =
      (NavigationWindow)this.Parent; // Don’t do this!

    window.Navigate(page);
}

It said "Don't do this!", but I was desperate and tried it anyway. It didn't work. Thankfully, later on in the article, it gave an example of how it is done in a way that works:

void viewHyperlink_Click(object sender, RoutedEventArgs e)
{
    // View Order
    ViewOrderPage page = new ViewOrderPage(GetSelectedOrder());
    NavigationService ns =
      NavigationService.GetNavigationService(this);

    ns.Navigate(page);
}

That's better!

The MSDN Magazine article I found (App Fundamentals, Build A Great User Experience With Windows Presentation Foundation) is still a very good article despite the code above.

Tags: ,