Archive

Archive for the ‘Silverlight’ Category

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 ,

Cyragon Games releases their latest hit: Strategic Command!

April 29th, 2009

Even though it appears that I’ve fallen off the end of the earth, it’s not true. For the last 45 days, I have been at the top-secret Cyragon Games headquarters working on their latest hit game.

Title from the game Strategic Command

Title from the game Strategic Command

That’s right, Strategic Command!

Two armies. One battlefield. One victor. Will it be you?

Use strategy and deception to maneuver your armed forces into your opponent’s territory and conquer their headquarters. The winner will be crowned with glory and live to see their name thunder down the hallowed corridors of time. The loser will be buried in infamy.

The fate of the war is in your hands. What will you do, commander?

This will be our entry in the Silverlight Server Quest Game Contest.

Strategic Command Screenshot

Strategic Command Screenshot

We’re planning to do a postmortem on the game and make some other exciting announcements so check back soon.

Announcement, Silverlight , ,