Archive

Posts Tagged ‘Silverlight’

Coping contents of Template Column in data grid to clipboard

August 18th, 2010

There are some nice new features (coming from Silverlight 2) in the latest versions of Silverlight – being able to copy rows in a DataGrid via the familiar Control+C for instance.

But I noticed something strange: some columns were blank when I pasted them into Excel (or notepad). The blank columns were always DataGridTemplateColumn and that made sense. How could it know what to copy from one or more controls?

Turns out this is really easy to fix if you are using data binding. All you have to do is bind the ClipboardContentBinding property on the DataGridTemplateColumn with the value you want copied for this column.

For example:

1
2
3
4
5
6
7
<data:DataGridTemplateColumn Header="Name" ClipboardContentBinding="{Binding Name}" SortMemberPath="Name">
  <data:DataGridTemplateColumn.CellTemplate>
     <DataTemplate>
        <HyperlinkButton Content="{Binding Name}" Margin="3" />
     </DataTemplate>
  </data:DataGridTemplateColumn.CellTemplate>
</data:DataGridTemplateColumn>

And that’s it. Control+C copy works as desired.

.NET, Silverlight ,

Strategic Command Featured on Silverlight.net!

August 7th, 2009

Strategic Command, the popular Silverlight game, has been added to the Silverlight showcase on the official Microsoft Silverlight site, Silverlight.net.

Check it out under Casual Games at: http://silverlight.net/Showcase/

News, Silverlight ,

Feeling the Func!

July 31st, 2009

We were recently featured on Michael Neel’s FuncWorks “FeelTheFunc” podcast. We touched on a range of topics from iPods to Silverlight contests to XNA. There was also a little behind-the-scenes discussion on our popular Silverlight game, Strategic Command.

If you’re interested in our current projects, we give a few exclusive details about what we’re working on and what’s coming up in the future!

Check it out here: http://feelthefunc.com/2009/07/20/EP13FarmerInTheFunc.aspx

Strategic Command on SilverArcade: http://silverarcade.com/games/benfarmer/Strategic-Command

General , , ,