Tim Hibbard

Software Architect for EnGraph software


News





Add to Google



My Stats

  • Posts - 593
  • Comments - 353
  • Trackbacks - 507

Twitter












Tag Cloud


Recent Comments


Recent Posts


Article Categories


Archives


Post Categories


Image Galleries


EnGraph Blogs


Links


Other


Roll


February 2008 Entries

VSTestHost.exe has stopped working


I keep getting this error in Visual Studio 2008 on Vista:

vstesthost has stopped working

I'm not sure what the issue is, but if you get this error, just stop the VSPerfMon.exe process and you can continue testing without rebooting your computer.

 

posted @ Wednesday, February 20, 2008 2:02 PM | Feedback (1) | Filed Under [ .NET ]


WPF - Get ListBoxItem from ListBox.SelectedItem


I had some trouble today getting the actual control that hosts data in a WPF listbox.  The magic class is ListBox.ItemContainerGenerator used like this:

MyStateObject current = this.myListBox.SelectedItem as MyStateObject;
ListBoxItem lbi = this.myListBox.ItemContainerGenerator.ContainerFromItem(current) as ListBoxItem;
lbi.Margin = new Thickness(10);

 

Technorati tags: , , ,

posted @ Wednesday, February 13, 2008 2:01 PM | Feedback (0) | Filed Under [ .NET WPF ]


VS 2008 - I want my prop snippet back!


For those of us that implement INotifyPropertyChanged on our state objects, the new Automatic Properties feature of Visual Studio 2008 hasn't been very useful.  In fact, the snippet prop that used to create a private variable and associated public property has now been replaced by an Automatic Property.

Thanks to a comment by SnYnE on this blog post, there is an easy way to get the functionality back.

Simply create a new text file at:
C:\users\*your user name*\Documents\Visual Studio 2008\Code Snippets\Visual C#\My Code Snippets

Call it "propc.snippet"

Populate the contents with:

<?xml version="1.0" encoding="utf-8" ?>

<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">

<CodeSnippet Format="1.0.0">

<Header>

<Title>prop</Title>

<Shortcut>propc</Shortcut>

<Description>Code snippet for property and backing field</Description>

<Author>Microsoft Corporation</Author>

<SnippetTypes>

<SnippetType>Expansion</SnippetType>

</SnippetTypes>

</Header>

<Snippet>

<Declarations>

<Literal>

<ID>type</ID>

<ToolTip>Property type</ToolTip>

<Default>int</Default>

</Literal>

<Literal>

<ID>property</ID>

<ToolTip>Property name</ToolTip>

<Default>MyProperty</Default>

</Literal>

<Literal>

<ID>field</ID>

<ToolTip>The variable backing this property</ToolTip>

<Default>myVar</Default>

</Literal>

</Declarations>

<Code Language="csharp"><![CDATA[private $type$ $field$;

public $type$ $property$

{

get { return $field$;}

set { $field$ = value;}

}

$end$]]>

</Code>

</Snippet>

</CodeSnippet>

</CodeSnippets>

Now when you type "propc" in Visual Studio, you will get the property constructor that you are used to.

 

posted @ Friday, February 08, 2008 1:58 PM | Feedback (0) | Filed Under [ .NET ]


Yahoo Live


Yahoo Live launched last night.  It is basically a social network of webcams.  They talk more about it on their blog.

Once I saw it on digg this morning, I configured my "live" in about 20 seconds.  It automatically pickup my webcam and started broadcasting.  My page is here, I doubt I'll keep it up, but it's fun to play with and it fits perfectly with my exhibitionism :)  They allow you embed your webcam, so I'm going to try that here:

 

Technorati tags: ,

posted @ Friday, February 08, 2008 8:35 AM | Feedback (2) | Filed Under [ Where's Tim Social Geocoding ]


Where's Tim fix - Get History


I finally fixed the Get History issue that hasn't been working on Where's Tim for a while now.  Apparently, the Google Maps API doesn't like it when you call removeOverlay with an uninitialized parameter.

history

http://timhibbard.com/wherestim/?history=01/31/08

 

posted @ Saturday, February 02, 2008 10:11 AM | Feedback (0) | Filed Under [ GPS Where's Tim ]