SharePoint Designer 2010 Trick


Some of us remember the perils of removing files that SharePoint decided to ghost in the content database.  Well for those of you that find yourself needing to remove items that are ghosted in SharePoint 2010 there is good news.  SharePoint designer can do it for you in four easy steps

  1. Open the site in designer
  2. Click on the All Files item in the navigation area
  3. Find the file and check it out
  4. right click on the file and click delete

Playing in SharePoint 2010’s sandbox


As the SharePoint developers among us are probably aware, the newest version of SharePoint now has the sandbox mode for solutions.  I knew about this mode and that it put certain limitations on the code in a sandboxed project.  What I did not realize, was that in a sandboxed solution you cannot create connectable web parts nor can you call external services.  Well you can create connectable web parts and call external services but if you do you should expect them to fail.

I recently was on a project where I the client needed a connected web part that hosted a Silverlight Bing maps control.  This control would display the items that were sent in using the web part connection.  This enabled the client to connect the web part to a list view web part and as the list view was filtered, so were the items in the silver light Bing map.  The other requirement was that they wanted this web part to be in the new Sandbox solution.  Sounds pretty simple right?

Well the Silverlight map part was pretty easy after i came up with a way to pass in the connected data.  Even the connected web part was pretty easy.  There is nothing special there, I just followed the MSDN example and that worked like a charm. 

Then came a problem.  I changed the SharePoint project from un-sandboxed to sandboxed.  After that my web part would no longer accept connections.  There was no error or information message as to why this was the case.  The connections context menu was just grayed out and a tool tip message just informed me that the web part did not accept connections.  The web part also performed an initial geocode using the Bing geocoding service and that stopped working.  I would get a error when the web part tried to geocode with a somewhat cryptic error.  This error had to do with the code attempting to run the program csc.exe.  I couldn’t figure out why my web part was trying to call the compiler. 

So the moral of the story is, if you need to call external services or have connectable web parts don’t try to use a sandboxed solution.

var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.”);
document.write(unescape(“%3Cscript src='” + gaJsHost + “’ type=’text/javascript’%3E%3C/script%3E”));

var pageTracker = _gat._getTracker(“UA-20994872-2”);
} catch(err) {}

Silverlight Sessions Recap

At MIX10 there were 3 SharePoint sessions.  I went to each of the sessions and found all of them interesting. 

All session links below go to the MIX page for that session.  At the MIX page you can view the recorded session.

There are several great introductory session on Silverlight 4:

Developing with WCF RIA Services Quickly and Effectively describes the capabilities of WCF RIA Services.  This is the new hot technology for accessing data from Silverlight.  It builds on LINQ and WCF and provides a LINQ to SQL like querying component for Silverlight.

Dynamic Layout and Transitions for Microsoft Silverlight 4 with Microsoft Expression Blend is an interesting session that describes the use of Blend to build transitions and layouts without writing code.

For developers with Flash experience there is an interesting session called Flash Skills Applied to Microsoft Silverlight Design and Development that can help bridge the gap between Flash and Silverlight.

SharePoint Sessions Recap

At MIX10 there were 3 SharePoint sessions.  I went to each of the sessions and found all of them interesting. 

All session links below go to the MIX page for that session.  At the MIX page you can view the recorded session.

The session Designing an Internet-Facing Web Site Using SharePoint 2010 discussed branding, silverlight, and the features that enable SharePoint 2010 to support Internet sites.  Among these features is Lockdown mode helps protect internet sites from anonymous access.  It allows anonymous users to access SharePoint 2010 pages and sites but also protects pages in the _layouts virtual directory and the forms pages.  This session provided in depth code examples for branding, theming, and even the incorporation of Silverlight elements to make sites more interactive.

The session Building Rich and Interactive User Experiences in SharePoint described the elements of SharePoint 2007 and SharePoint 2010 that enable the features that are necessary for public internet sites.  Public internet sites need advanced branding and accessibility.  Some public sites need translations for other countries or target users.  This session focused mostly on describing techniques that could be used and did not cover actual code examples.

The final SharePoint session entitled Designing Corporate Web Sites using SharePoint 2010 described tools and techniques used to design sites in SharePoint.  This is an interesting session as it shows developers techniques and the tools that support them like SharePoint Designer, Expression Blend, and Visual Studio.  This session is a must for developers that want to build highly interactive sites in SharePoint.

ReMix10 for Innovative Architects

In March I went to the MIX10 conference in Las Vegas.  In this post I will highlight the information covered at our company meeting.

Session Recap Links

SharePoint Sessions Recap

Silverlight Sessions Recap

March Announcements

At MIX there were many announcements made about new tools available.  To see a full list of announcements from mix visit  The 3 announcements that I think are most relevant to IA are:

April Announcements

  • Visual Studio 2010 will be released
  • Silverlight 4 will be released
  • Windows Phone 7 Series Beta Tools will be released

Silverlight 4

Microsoft has really stepped up its game through the Silverlight releases.  Silverlight 4 will provide new capabilities that will greatly enhance our ability to provide desktop like applications to users over the web.  With SharePoint 2010’s support of silverlight, we will be able to build highly interactive solutions to our clients.

New Capabilities

There are too many new features in Silverlight 4 to mention them all but here are a few that I thought would be incredibly helpful.

  • Right click ability, drag and drop capable, Bing map control
  • Out of the Browser Trusted mode
  • Out of the Browser Toasts / Notifications
  • Out of the Browser Rich networking in trusted mode

Silverlight 2 introduced Deep Zoom, Silverlight 3 introduced Photosynth, and now Silverlight 4 introduces Pivot.  Pivot is a new feature that enables developers to show the overall information hidden in large datasets.  The technology uses deep zoom image sets and special xml files specifying the information about the images.  This information is categorized by facets.  When silverlight 4 is released in April, the Associated Press and Sports Illustrated websites may have Silverlight Pivot elements.

Windows Phone 7 Series

A Zune phone has been speculated about by Zune fans for a long time.  While the Windows Phone 7 Series will have Zune functionality it is much more than a phone that plays music.  The Windows Phone 7 Series is a device capable of interactive Silverlight content and XNA games.  The phone is designed around task centered hubs.  Each hub is focused around one main goal.  For example the Music and Video hub is focused on the playback of media. Hubs are extensible meaning that applications built for the phone can specify what their role is like media playback or social networking.  Applications that specify this information are added to the appropriate existing applications on the device enabling companies like NetFlix to build an app that can be accessed from the same hub that music and video from Zune is accessed.

  • Windows Phone 7 Series Apps can be written in Silverlight or XNA
  • All applications have hardware acceleration enabled
  • When released, the development tools will be free forever

SharePoint 2010

  • SharePoint 2010 is targeting the WCGA 2.0 AA Accessibility standard
  • SharePoint 2010 will render clean html with the exception of a few legacy webparts
  • SharePoint 2010 is targeting IE 7, IE 8, Firefox, and Safari on OSX
  • SharePoint 2010 will have a developer dashboard that can be enabled during development.  This dashboard can help developers speed up page load time.

SharePoint 2010 Branding

  • Branding is much improved over branding in MOSS
  • The new theme capability can recolor images and even replace them.  To improve theming, branders can specify css hints to help SharePoint 2010 in its coloring
  • In MOSS, special pages like login or errors were a little more difficult to brand.  In SharePoint 2010, these pages can be redirected to other pages through the use of a powershell command-let.
  • Microsoft will provide a mostly style free master page called Starter.master for branding.  This master page will have very little if any style applied to it
  • SharePoint 2010 introduces many new controls.  One of these is the CssRegistration control.  This is the new control that should be used to specify custom css files.  If this control is used then SharePoint 2010 can use the theme feature


Many design topics were discussed at MIX but among them a highly relevant one for IA was the launch of a new design toolbox site.  Located at, the design toolbox site is a training portal for learning the art of graphic and user experience design related topics.  The site has 2 tracks now with more to follow.  Right now visitors can progress through the Design Scenarios and Design Principles tracks.  Windows Phone 7 Series design tracks are being prepared for release later in 2010.


On Friday I am headed to the MIX10 conference.  I have to admit that I have wanted to go to MIX for several years and now my company has sent me.  It is pretty exciting.  In addition to attending the conference, I am also going to the workshops on Sunday. 

I will be attending the Silverlight 4.0 boot camp and the ASP.NET MVC boot camp workshops.  This is pretty exciting because I know a good bit about silverlight from personal and work projects.  I have also read a lot about silverlight 4.0 but I have not yet taken the plunge to the new beta.  I do however have a personal project in mind for silverlight 4 and plan to work on it in the next few months.

While at MIX, I will be blogging about the conference and what I think are the big takeaways from the sessions I attend.  I will also give feedback from some of my friends and colleges at MIX so stay tuned….

Binding simple controls (Textbox, TextBlock, Button, etc)

In this post I will be describing how to bind data to simple controls.  The controls I will discuss are the Textbox, TextBlock, and Button controls however this technique can be used to bind data to other controls.  I will also discuss the use of sample data sources in Microsoft Blend. 

In Silverlight there are 3 types of data binding in silverlight.  They can take the form of one-way, two-way, or one-time.  One-way data binding allows the data bound control to be automatically updated when the property that is bound is changed.  This automatic updating is made possible by implementing the INotifyPropertyChanged.  In two-way data binding the data context can be updated when it is changed and when the user interface is changed it can be sent back to the database to update. 

Blend allows designers to build and bind data sources to controls during design time that can be modified or overridden at runtime.  Binding can be done against CLR objects, sample and live data sources, and custom expressions. In this tutorial we will use CLR Objects for our data binding.  In later more complex tutorials we will use other types of data binding.

Simple controls – Textbox

We will now do a short tutorial demonstrating how to use Blend to do one-way data binding of the String CLR object to a Textbox.  We could just as easily bind to a custom object but we will leave that for the next tutorial.

  1. To get started run Microsoft Expression Blend and create a new Silverlight Application.
    If you have not used Blend before then you will notice that it only creates the Silverlight project unlike Visual Studio which also creates a web site or application to host the silverlight .xap file.  When you run your new application from Blend, it will create a test page to host your silverlight application so you can decide where and how to host it later.
  2. Add a textbox to the LayoutRoot in the MainPage.xaml
    You can do this one of several ways.  You could type in the xaml to create the textbox, but since I am trying to show you how to use some of the GUI aspects of Blend I will show you how to drag-and-drop a textbox onto the LayoutRoot.
    1. Go to the assets panel
      you can do this by clicking on the assets toolbox button (shown here) AssetsImage or the assets tab (shown here)topLeftTabs
    2. In the search box type Textbox
      You will end up with this on your screen.
    3. Drag the Textbox asset onto the design surface
      You can make it any size you want, put it any where you want and event change the font, color, font size and other attributes.

DataBinding the controlimage

  1. Scroll down to the Common Properties section on the Properties Tab
  2. Click the New Button beside DataContext
  3. Check the Show System Assemblies checkbox
    Since we want to data bind to a System.String CLR object we need to select that object.  It is a System Assembly so this checkbox allows us to see it.
  4. Select String and Click OK
    To make it easy to find System.String your can start to type String into the search box and it will filter the results.  Later we will see that this filtering also works on our custom CLR objects.
  5. To Bind to our new property Click the square next to the Text property in the Common Properties section.

Now the textbox is bound to the the string object.  This is not a particularly interesting data binding but it is a data binding. In the next tutorial we will bind to a custom CLR object.