Friday 3 September 2010

Sharepoint

I have recently started developing webparts using Sharepoint 2007. Some *fun* things I have encountered along the way...

Styling in sharepoint was tricky, until I started using 960 Grid System

I wrote a method to take in either one or two controls, and a main div to hold them. Styles for the control divs can also be passed.

I then wrapped each control in a div, gave it the gs class it needed i.e. "grid_12" as well as any styles passed in.

Then I added these divs to a container div and returned this so it could be styled independently.

(Main Div Holds Container Div, which holds Control Divs.)

Links - Visual Studio Styles & Winmerge

http://studiostyles.info/

More visual studio styles. Like below....

Visual Studio, and SQL Server "High Contrast" Themes.

When developing, I like to use a high contrast theme as I think it's easier on the eyes.

There is a big list to choose from here...

http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx
I use Brad Wilson's theme.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


I recently found that you can export these setting from VS to SQL MS. The utility below helps, just ensure that the registry keys are entered correctly - the default is vs2005 to sql2005, but there is help in the comments for changing these to vs2008 or sql2008.



http://winterdom.com/2007/10/colorschemesinsql2005managementstudio

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

As the merge tool included with VS is the worst piece of software ever written, I would recommend that you do as I have done and upgrade to use winmerge, which makes the process of merging in changes a lot more painless!

Get Winmerge here
In Visual Studio do the following:

Click on Tools menu
Click on Options menu item
Expand Source Control tree item
Select Visual Studio Team Foundation Server tree item
Click on Configure User Tools... button
Comparing

To use WinMerge as the Compare/Diff tool:

Click the Add... button
For Extension, type *
For Operation, select Compare
For Command, browse for C:\Program Files\WinMerge\WinMerge.exe
For Arguments, type /x /e /ub /wl /dl %6 /dr %7 %1 %2
Click OK to accept
Merging

To use WinMerge as the Merge tool:

Click the Add... button
For Extension, type *
For Operation, select Merge
For Command, browse for C:\Program Files\WinMerge\WinMerge.exe
For Arguments, type /x /e /ub /wl /dl %6 /dr %7 %1 %2 %4
Click OK to accept

Info stolen from here:

http://www.neovolve.com/post/2007/06/19/using-winmerge-with-tfs.aspx