
Here I am slogging my guts out, trying to get TFS Sticky Buddy v2.0 out the door and bang goes the TFS server :(
This is tfs05 on the Codeplex environment. All the others seem to be running OK, but juts my luck the one I am using is the one that is affected, and nothing on the Outage page! its been 3 hours and nothing. I have emailed them and reported it on the Discussions page.

Now, although I am, I am not really complaining as they have provided a fantastic service over the last, what… two years!
Hats off to the CodePlex team, but get the bloody server fixed so I can check in my code!
If, like me, you are interested in using all the new fangled controls produced by every man and his dog, you will probably have come across the Infragistics WPF control. My mission, that I stupidly accepted, was to update the TFS Sticky Buddy application with their XamRibbon and XamDockManager controls, and anything else I can stuff in there.

The “anything else” I decided to use was the Composite WPF guidance. This is a newer WPF version of the Client Application Block (CAB) packages provided by the Patterns and Practices teams at Microsoft.
Anyhoo, I though I should give some advice for those of you mixing these technologies. I seam to have licked the XamRibbon implementation, but I am still working on the XamDockManager bits.
Note: You will need to be familiar with the Composite WPF bits for this all to make sense.
1: <igRibbon:XamRibbon x:Name="uxXamRibbon" cal:RegionManager.RegionName="{x:Static inf:RegionNames.Shell_Ribbon}" AllowMinimize="True" AutoHideEnabled="False" IsMinimized="False">
2: <igRibbon:XamRibbon.ApplicationMenu>
3: <igRibbon:ApplicationMenu cal:RegionManager.RegionName="{x:Static inf:RegionNames.Shell_RibbonApplicationMenu}" Image="/Hinshelwood.TFSStickyBuddy;component/RDIcon.ico">
4: <igRibbon:ApplicationMenu.FooterToolbar>
5: <igRibbon:ApplicationMenuFooterToolbar cal:RegionManager.RegionName="{x:Static inf:RegionNames.Shell_RibbonApplicationMenuFooterToolbar}">
6: </igRibbon:ApplicationMenuFooterToolbar>
7: </igRibbon:ApplicationMenu.FooterToolbar>
8: </igRibbon:ApplicationMenu>
9: </igRibbon:XamRibbon.ApplicationMenu>
10: </igRibbon:XamRibbon>
As you can see there are a number of regions here, for the Tabs, the Application Menu and the FooterToolbar. You will need both a XamRibbon and a RibbonTabItem adapter.
1: Public Class RibbonRegionAdapter
2: Inherits RegionAdapterBase(Of XamRibbon)
3:
4: Private m_regionTarget As XamRibbon
5:
6: Protected Overrides Sub Adapt(ByVal region As Microsoft.Practices.Composite.Regions.IRegion, ByVal regionTarget As XamRibbon)
7: m_regionTarget = regionTarget
8: regionTarget.Tabs.Clear()
9: AddHandler region.ActiveViews.CollectionChanged, AddressOf OnActiveViewsChanged
10: For Each v As RibbonTabItem In region.ActiveViews
11: regionTarget.Tabs.Add(v)
12: Next
13:
14: End Sub
15:
16: Private Sub OnActiveViewsChanged(ByVal sender As Object, ByVal e As NotifyCollectionChangedEventArgs)
17: Select Case e.Action
18: Case NotifyCollectionChangedAction.Add
19: For Each v In e.NewItems
20: m_regionTarget.Tabs.Add(v)
21: Next
22: Case NotifyCollectionChangedAction.Remove
23: For Each v In e.OldItems
24: m_regionTarget.Tabs.Remove(v)
25: Next
26: End Select
27: End Sub
28:
29: Protected Overrides Function CreateRegion() As Microsoft.Practices.Composite.Regions.IRegion
30: Return New AllActiveRegion
31: End Function
32:
33: End Class
1: Public Class RibbonTabItemRegionAdapter
2: Inherits RegionAdapterBase(Of RibbonTabItem)
3:
4: Private m_regionTarget As RibbonTabItem
5:
6: Protected Overrides Sub Adapt(ByVal region As Microsoft.Practices.Composite.Regions.IRegion, ByVal regionTarget As RibbonTabItem)
7: m_regionTarget = regionTarget
8: regionTarget.Content.Clear()
9: AddHandler region.ActiveViews.CollectionChanged, AddressOf OnActiveViewsChanged
10: For Each v As Object In region.ActiveViews
11: regionTarget.Content.Add(v)
12: Next
13:
14: End Sub
15:
16: Private Sub OnActiveViewsChanged(ByVal sender As Object, ByVal e As NotifyCollectionChangedEventArgs)
17: Select Case e.Action
18: Case NotifyCollectionChangedAction.Add
19: For Each v In e.NewItems
20: m_regionTarget.Content.Add(v)
21: Next
22: Case NotifyCollectionChangedAction.Remove
23: For Each v In e.OldItems
24: m_regionTarget.Content.Remove(v)
25: Next
26: End Select
27: End Sub
28:
29: Protected Overrides Function CreateRegion() As Microsoft.Practices.Composite.Regions.IRegion
30: Return New AllActiveRegion
31: End Function
32:
33: End Class
I am pretty sure that these can be augmented, and I can think of a few Ideas already, including adding a re-parenting ability to allow menu items to be added to the XAML as well as programmatically added.
I think I might have to go away and try this…
It seams that Microsoft is making an attempt to integrate with OpenID. With the announcement that “Windows Live ID commits to support of OpenID” I thought a little investigation would be in order.
You need to setup a new Live ID on the Live-INT service, you can use any email, but make sure that you do not use your production password!
Go to https://login.live-INT.com/ and use the sign-up button to set up a Windows Live ID test account in the INT environment. Go to https://login.live-int.com/beta/ManageOpenID.srf to set up your OpenID test alias.
You alias will be “http://openid.live-int.com/[yourAlias].
You can then associate an open ID with a site. Here is the experience with Plaxo:
From the Plaxo homepage, click “Settings”…
Then select “Identities” and “Manage your OpenID’s”.
You can then attach any number of OpenIDs to your Plaxo account. So lets click “Attach a new OpenID”.
And then “SignIn”.
This is where Windows Live takes over from the main sites, and you enter your password for your Live account.
I am hoping that they will be releasing a version that works for .NET applications and not just websites. This would allow application developers to join the ranks of interconnected authentication application with single sign-on.
It is a dream I have…
Technorati Tags:
Windows Live,
OpenID
I hope everyone is looking forward to the new Xbox live experience that will be going Live tomorrow! Hopefully we are passed the days of the ring of death from the update, unless you have a hacked box :)
Although I am not really interested in the Avatar piece, I think it will be well worth it. The update process is a little different this time, so you are not surprised there is a video detailing the process.
I never made it into the Preview program this time around, but watch this space for my Avatar tomorrow :)
Well, that's me got passed the 100,000 Visits milestone. I guess it is seams bigger than it is, but as the next big one would be a million I am chuffed to get this far :)
-- Site Summary ---
Visits
Total ...................... 101,421
Average per Day ................ 319
Average Visit Length .......... 1:10
This Week .................... 2,231
Page Views
Total ...................... 134,216
Average per Day ................ 410
Average per Visit .............. 1.3
This Week .................... 2,873
I always like to look at the browser share, and yes, I know that my site is not indicative of the internet in general but it is still interesting.
Looks like IE7 is winning the day :)
But is is the Countries that shows how…”cosmopolitan”… your site is:
Non to shabby for a wee developer in Glasgow, Scotland :)


Ok, so I lied a little. It is not that cheap, but 30% off an upgrade from a team edition to full Team Suit is nothing to be sniffed at, it could be as much as £1000 off!
If your team is using any component edition of Visual Studio Team System 2008 (Development Edition, Test Edition, Architecture Edition, or Database Edition), now’s the time to get more out of your development solution. Step up to the complete Visual Studio Team System 2008 Team Suite, and save 30%. That’s a huge savings to give your development team the full suite of tools - and help them collaborate better than ever during the entire application lifecycle.

It seams that the event of the year is back! Developer Day Scotland returns for a second year as posted by Barry Dorrans in Glaswegien :)
Last year was a fantastic event that I enjoyed immensely :) I will be there… will you?
If, like me, you like to have changeable resource files in your application. Wither it is for changing the Theme, or interchanging templates you will need to take special care when using the
libraries.
The new version of the TFS Sticky Buddy uses both!
I am using the built in Infragistics theme system, and the first time you select a theme I am just adding a resource file that overrides the default:
1: Dim resourceDictionary As ResourceDictionary = ThemeManager.GetResourceSet(theme, ThemeManager.AllGroupingsLiteral)
2: If Not resourceDictionary Is Nothing Then
3: Application.Current.Resources.MergedDictionaries.Add(resourceDictionary)
4: End If
This causes an error in the ItemsControlRegionAdapter as WPF seams to redo the region adapters and you get a ItemsControlHasItemsSourceException. You need to change the code to the following (notice the commented out areas):
1: /// <summary>
2: /// Adapts an <see cref="ItemsControl"/> to an <see cref="IRegion"/>.
3: /// </summary>
4: /// <param name="region">The new region being used.</param>
5: /// <param name="regionTarget">The object to adapt.</param>
6: protected override void Adapt(IRegion region, ItemsControl regionTarget)
7: { //Modified by Martin Hinshelwood to allow resource file changes...
8: //if (regionTarget.ItemsSource != null || (BindingOperations.GetBinding(regionTarget, ItemsControl.ItemsSourceProperty) != null))
9: // throw new InvalidOperationException(Resources.ItemsControlHasItemsSourceException);
10:
11: //If control has child items, move them to the region and then bind control to region. Can't set ItemsSource if child items exist.
12: if (regionTarget.Items.Count > 0)
13: {
14: foreach (object childItem in regionTarget.Items)
15: {
16: region.Add(childItem);
17: }
18: //Control must be empty before setting ItemsSource
19: regionTarget.ItemsSource = null;
20: //regionTarget.Items.Clear();
21: }
22: regionTarget.ItemsSource = region.Views;
23: }
You will notice that I had to comment out the exception for existing controls as well as the Items.Clear (which is replaced by setting the ItemsSource to nothing). This solves the problem I I have not noticed any adverse reactions.
The second problem occurs when you do you second set of the theme. at this point you need to remove the existing theme:
1: If Not m_CurrentTheme Is Nothing Then
2: Application.Current.Resources.MergedDictionaries.Remove(m_CurrentTheme)
3: End If
When this happens the region management is redone and you get a further RegionNameExistsException from the RegionManager. Then can be solved by changing the code in the AttachNewRegion method:
1: /// <summary>
2: /// Attaches a region to an object and adds it to the region manager.
3: /// </summary>
4: /// <param name="regionTarget">The object to adapt. This is typically a container (i.e a control).</param>
5: /// <param name="regionName">The name of the region to register.</param>
6: /// <exception cref="ArgumentException">When regions collection already has a region registered using <paramref name="regionName"/>.</exception>
7: public void AttachNewRegion(object regionTarget, string regionName)
8: { //Modified by Martin Hinshelwood to allow resource file changes...
9: if (Regions.ContainsKey(regionName))
10: return; //throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.RegionNameExistsException, regionName));
11:
12: IRegionAdapter regionAdapter = regionAdapterMappings.GetMapping(regionTarget.GetType());
13: IRegion region = regionAdapter.Initialize(regionTarget);
14:
15: Regions.Add(regionName, region);
16: }
So instead of bombing out when you try to add a region of the same name, it will just ignore it. Not ideal, but necessary.
This looks like a fantastic product that will let you do pretty much everything that has been missing from TFS. You can cop / clone projects across servers. you get disaster recovery capabilities that surpass anything that has before been available!
Looks like the feature mix will be fabulous…
One to watch I think….
Updated: Added missing links… Thanks for spotting it :)
There is a new release of the Power Tools for team system. As an MVP I was involved in the trial that started early this month, and I can tell you that a LOT of work has gone into these :)
Willy-Peter Schaub's has posted about them and I don’t see as I need to add to his detailed post…
Lets just say that it will be a while in development. I am trying to implement the Composite Application blocks for WPF from Microsoft in an attempt to make the application more modular. I will be updating and releasing under the v2.0 CTP version and I have uploaded the installation files. This is a ClickOnce application, so you will always have the latest version of the CTP.
The current version CTP1 has only those changes to allow for the new Navigation and structure options, but More features are on the way.
I will be working on some new features to the Sticky Buddy application. Improvements in the interface, along with a more modular structure and more diagram offering are in the mix. I have been working on some of the enhancements and their implementation in my other lesser known project TFS Heat ITSM…
As you can see, a new look and feel for a new version, but this should allow me to implement a better modular design and separate out
the individual bits and pieces.
Head over to Codeplex and vote for your favourite feature, ort add a new one :)
Issue Tracker
My favourite author, David Webber, has an interview on you tube.
I have read every one of his books, and I just love the Military Sci-Fi genre…
Until the 30th of November 2008 Mozy are increasing the amount of space you get for referring a friend from 256mb to 512mb!
This is excellent and everyone should have some sort of backup :) as long as you click my referral link and use Mozy…
http://mozy.com/?ref=8R96AG

Really, Mozy is a good backup solution and I have been using it for my family and me for a good wee while. In fact, with 2gb for free, if anyone asks me to setup their computer (“No I will not fix yours!”) then I always add it as it makes it way easier to reload from a crash…
Technorati Tags:
Backup,
Mozy
I always like to see people for whom it is traditionally unlikely to blog to start contributing to that big knowledgebase in the either that is the blogosphere. I would like to call attention to Eric McCarthy who started blogging today and call out to all other helpdesk Hero’s to join the fray…
Technorati Tags:
Blog,
Blogging
I am currently getting to grips with the Infragistics WPF controls that they call NetAdvantage for WPF. So far I have found them easy to use, but the documentation of examples is very lax. Do not mistake me, these components are fantastic and do way more work for me than I would care to do myself, but if you Google a particular piece of their API invariable you will get pure documentation and no samples. If you are lucky someone has asked a specific question about it and you can skim their answers, but the likely hood of finding an answer to your question is negligible in my experience.
I still love the components, it just makes it a little more difficult to develop with them…
An example would maybe get us all on the same page:
I am using their Ribbon components in one of my applications and wanted to dynamically generate (using a binding) the menu options.
1: <igRibbon:XamRibbon.ApplicationMenu>
2:
3: <igRibbon:ApplicationMenu>
4: <igRibbon:MenuTool x:Name="uxTeamServerMenuTool" Caption="Team Server" ItemsSource="{Binding AvailableServers}" ItemTemplate="{DynamicResource tAvailableServers}" ButtonType="DropDown" LargeImage="\Resources\Images\TeamServerSelectIcon.png">
5: </igRibbon:MenuTool>
6: <igRibbon:MenuTool x:Name="uxTeamProjectMenuTool" Caption="Team Project" ItemsSource="{Binding AvailableProjects}" ButtonType="DropDown" SmallImage="\Resources\Images\TeamProjectSelectIcon.png">
7: </igRibbon:MenuTool>
8: <igRibbon:MenuTool x:Name="uxHeatConnectionMenuTool" Caption="Heat Server" ButtonType="DropDown">
9: </igRibbon:MenuTool>
10: <igRibbon:MenuTool x:Name="uxHeatApplicationMenuTool" Caption="Heat App" ButtonType="DropDown" >
11: </igRibbon:MenuTool>
12: <!-- Place a button in the footer of the ApplicationMenu that allows the user to quit the application. -->
13: <igRibbon:ApplicationMenu.FooterToolbar>
14: <igRibbon:ApplicationMenuFooterToolbar>
15: <igRibbon:ButtonTool Caption="Settings" Command="local:Commands.ClearSettingsCommand" />
16: <igRibbon:ButtonTool Caption="Exit" />
17: </igRibbon:ApplicationMenuFooterToolbar>
18: </igRibbon:ApplicationMenu.FooterToolbar>
19: </igRibbon:ApplicationMenu>
20: </igRibbon:XamRibbon.ApplicationMenu>
As you can see in line 4 there is a binding that does indeed populate the list. But I am having trouble getting the template to take. I want the Items listed as a set of radio buttons (kinda) and so I added a Template:
1: <DataTemplate x:Key="tAvailableServers" DataType="{x:Type tfs:TeamFoundationServer}">
2: <igRibbon:RadioButtonTool
3: Caption="{Binding Name}"
4: Tag="{Binding}"
5: LargeImage="\Resources\Images\TeamServerSelectIcon.png"
6: igRibbon:MenuToolBase.MenuItemDescription="{Binding Url.ToString}"/>
7: </DataTemplate>
This should have displayed what I wanted, but it seams to be ignored.
To allow this to work, all I needed to do was remove the x:Key from the template. But why can't I specify a template by name. What if I wanted to have two templates and choose which one was displayed…
I am having a little bit of fun with this application and I though I would share. it logs all of the applications that you are using and gives you stats on it. How about joining the Microsoft MVP (MVP’s only please) team, or creating your own…
Here is my usage, which will be exactly the same as the MVP one at the moment as I am the only one there :(
It is certainly not the fastest site in the world, but my work internet connection is notoriously poor…
If you have an application, you can get stats for it… for example here is Visual Studio…

And my very own paltry TFS Sticky Buddy

Technorati Tags:
Fun,
Personal