Extending VS 2010

In VS 2010 MS has made adding extensions very very easy using the Extension Manager.

First you may want to change one option under Environment > Extension Manager.

You want to Load Per User Extensions when running as administrator.

image

Once you do that, from the Tools menu open the Extension Manager. The Extension manager shows you what extensions you already have installed, and gives you the ability to uninstall or disable them.

image

So where do I get extensions from? The extension manager helps here too. Select the Online Gallery and you will be able to pick from a list of published VS extensions. You can filter to just see Controls, Templates or Tools. Sorting is a handy way to see what is popular by rating or most downloaded.

image

Select the extension you want and click Download. You will be prompted to install the package. Now just restart Visual Studio and enjoy your new VS extension. :)

Code Coverage in VS2010

VThis took me a few minutes to find. Perhaps I can save someone else those few minutes.

To turn on Code Coverage locally you need to edit what used to be the <Local>.TestRunConfig , which is now called the <Local>.TestSettings.

The section is not called Code Coverage anymore it’s under Data and Diagnostics. There are a bunch of  tools you can turn on from here including:

image

Select Code Coverage, and the configure button at the top will become enabled.

image

To select the DLL’s for code coverage click the Configure button. You will get this window, I think you know what to do from here.

image

Access 2007 &amp; SharePoint

If you are responsible for content in SharePoint in any way you should take a look at Access. Weather you are just updating information ongoing, or migrating information from an old site, or from other sources Access is the way to go.

I recently had several hundred items that needed to go into a list. The data was sent to me in an Excel spread sheet. So I thought I would look into the Excel Add-ins for SharePoint.  image

I knew Open with Access was an option in the list Actions menu but always dismissed it. I didn’t want to open up Access, I haven’t used that old tool in years. However with a need to insert hundreds of list items and a faint hope that using a client application to edit those lists would be a much nicer experience then  using SharePoint itself I clicked on the menu item.

You can completely manage your list with Access.

You don’t even have to log in to the SharePoint site via your browser. Open Access, then from the External Data tab on the ribbon select SharePoint Lists then Existing SharePoint List. Enter the URL of the SharePoint site, log in and select the option Link to the Data source by creating a linked table.

At this point select the lists you would like to work with and they will be added as tables in Access linked directly to SharePoint. Now that you have your list as an Access table the options for managing that data is endless.

You can update, insert and Delete using SQL Statements.

You can import data from multiple sources including Excel, Another SharePoint List, Text, XML, Word Mail merge, HTML, ODBC and more.

image

Trust me this is an option you will be happy you explored.

Google vs Bing Maps

I have been a fan of Google for a long time. I tried Live Search but ended up going back to Google.

The other day I was looking for an address in rural Hamilton, Flamborough actually. The address was 359 Concession 10 East Hamilton. I knew the general location I just wanted to know some street names around it to figure out the best route.

When I entered the address into Google Maps it took me to 359 Concession St in Hamilton which is on the mountain not in Flamborough. I tried various incarnations of the address but Google could not seem to find it. 

Therefore I switched over to Bing maps, entered the address the same as I had for Google and Bing found the exact location.

Bing, you have my attention!

Windows 7 Programming

Windows 7 is coming and there is plenty for .net developers to be happy about.

First of all there are the managed Code API’s written by the Windows SDK team. This is a set of libraries that take care of all the interop necessary for communicating between .NET and the native windows API.

What’s included in this API you ask?

Support for Windows Shell namespace objects, including:
   Windows 7 libraries
   Known Folders
   Non-file system containers
Windows Vista and Windows 7 Task Dialogs
Support for Windows 7 Explorer Browser Control
Support for Shell property system
Windows 7 Taskbar
Support for Windows Vista and Windows 7 common file dialogs, including custom file dialog controls
Support for Direct3D 11.0 and DXGI 1.0/1.1 APIs
Sensor Platform APIs
Extended Linguistic Services APIs

Download here, Read more here.

Windows 7 Gestures.

The next version of WPF will include .NET support for Windows 7 MultiTouch.

Until then Windows 7 MultiTouch API’s are native Win32 based only. However you can download the MultiTouch Sample .Net Interop Library. This Library is full of samples to help you understand this managed API.

Download here.

Silverlight on the Silver Screen

You don’t want to miss this. It’s going to be great.

July 9th 2009 at the Scotia Bank Theatre

star_wars_smsilver_thunder_sm

No CI Build on Check-in

Found this out just this past week. What a great tip. Thanks Colin Bowern by way of Buck Hodges

Have you ever wanted to check something in without kicking off the CI build?

All you have to do is put ***NO_CI*** in the check in comment.

Now I will never forget.

Business Intelligence Smart Breakfast

If you want to learn what your data can do for you. You should attend The next ObjectSharp Smart breakfast with David Chennells.

Click on the image below for more information and to register.

Twitter

Although I have been twittering, I have also been struggling with its usefulness. Frankly I don’t care what you had for dinner, or how you golfed yesterday.

There is certainly good info on the web that people broadcast that I may not have come across on my own. To date that was the driving force to Tweet and follow, for me.

However, I attended a MS event yesterday and the first speaker talked about a bakery in London that tweets when a batch of bread is coming out of the oven. Using a Baker Tweet device. The bakeries followers can then follow a link to a picture of the product and a map to the location.

I have to admit this put a new light on Twitter for me. Knowing what someone is doing right now seems pointless to me, but finding out a batch of rye just came out of the oven is useful.

Twitter is like an event broker. If I want to execute my buy fresh bread event when the bread is at it’s freshest. I just subscribe to the service and twitter sends the event publication. Twitter makes it possible for the execution of that event to be in sync with the bread coming out fresh from the oven. In the past it fired when I wanted fresh bread but that did not mean the bread was fresh.

Now that I am seeing twitter for what it really is, the possibilities are endless.

Using the WPF DockPanel

For those WinForm developers that are familiar with the Dock Property of Win32 controls, you may be looking for Fill as a DockPanel.Dock value in WPF. There isn’t one. Not to worry docking is easier with the DockPanel then it was in WinForms.

In WinForms, when using the Dock property didn’t result in the look you expected, The way to fix it up was to open the Document Outline window and reorder the controls you were docking. The order along with the Dock property value dictated how the controls would be laid out.

This is also true in WPF. When using the DockPanel you will notice there are four Dock options to select from Bottom, Top, Right and left. There is no fill. However the order of the controls will determine which one fills the panel.

When laying out a DockPanel think of it this way. Your controls will be placed in the panel in the order you have them listed in the XAML. The examples below show how changing the order of the controls changes how the controls are docked. 

When the first control is docked Left it is occupying the whole left side of the DockPanel. While the last control will fill the remaining space in this case the control docked to the Bottom.

 

<DockPanel>
        <Button DockPanel.Dock="Left">Left</Button>
        <Button DockPanel.Dock="Top">Top</Button>
        <Button DockPanel.Dock="Right">Right</Button>
        <Button DockPanel.Dock="Bottom">Bottom</Button>
    </DockPanel>

image
Putting Top first, makes it occupy the whole top, then with bottom second it occupies the whole bottom. Left goes in between, and Right fills the remainder of the DockPanel.  

<DockPanel>
    <Button DockPanel.Dock="Top">Top</Button>
    <Button DockPanel.Dock="Bottom">Bottom</Button>
    <Button DockPanel.Dock="Left">Left</Button>
    <Button DockPanel.Dock="Right">Right</Button>
</DockPanel>

image
This example shows how this rule holds true even when more then one control has the same docking.  

<DockPanel>
    <Button DockPanel.Dock="Left">Left 1</Button>
    <Button DockPanel.Dock="Top">Top</Button>
    <Button DockPanel.Dock="Bottom">Bottom</Button>
    <Button DockPanel.Dock="Left">Left 2</Button>
    <Button DockPanel.Dock="Right">Right</Button>
</DockPanel>

image

Happy Docking!