Tag Archive for 'mix'

SnippetManager

Updated 3/22/09: SnippetManager now copies the snippet to the clipboard when selected.

I’ve gotten a lot requests for the snippet manager I used at my Mix08 session.

So as promised, here it is for everyone who is interested: app, code.

The first incarnation of this application was done by Nick Kramer (Thanks Nick!).  I’ve tweaked it and added a WPF frontend.

How do I use it?

  • To use a snippet, drag the title of the snippet to the desired target app.
  • In order to move the app around, drag the black bottom portion of the window.
  • The topmost checkbox and load/close buttons work as you would expect.

If desired, you can start the app from the commandline:

snippetmanager.exe /notontop [snippetsfile] [snippetsfile] …

where /notontop indicates that the snippet manager should start out NOT being topmost.

What is the format of the snippet file?

The format of the snippet file is:

Line Meaning
/////////////////////////////// Separates the contents of one snippet from another snippet.
// First Snippet Title Indicates what the “title” for a snippet should be.

(Note: if a snippet does not have a title, the first line of the snippet appears in the snippet manager.)

————————– Separates sections of snippets and restarts numbering of snippets.
partial line:<content> Should treat <content> as part of an existing line.  (i.e. Snippet should not include a line break at its end.)
<other> Any other line is treated as the content of a snippet

Given the “exactness” of the file format, I’d recommend always copying and editing the sample snippet file.

The sample snippet file (which was used in the above screen shot) is included in the zip and shown below:

   1: ///////////////////////////////
   2: // First Snippet Title
   3:         <Style x:Key="TitleStyle" TargetType="TextBlock">
   4:             <Setter Property="FontSize" Value="35"/>
   5:         </Style>
   6: ///////////////////////////////
   7: // Second Snippet Title
   8: partial line:Style="{StaticResource TitleStyle}"
   9: ///////////////////////////////
  10: Snippet content (no title)
  11: ///////////////////////////////
  12: --------------------------
  13: ///////////////////////////////
  14: // Second Snippet Section
  15:         <ControlTemplate x:Key="SubmitButtonTemplate" TargetType="Button">
  16:             <Grid Width="70" Height="20"  Background="DarkGray">
  17:                 <TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="12" FontFamily="/fonts/IngebretsenNeato.ttf#Ingebretsen Neato" Text="Submit"/>
  18:             </Grid>
  19:         </ControlTemplate>

FlickrViewr

At my Mix08 session last week, I showed off a FlickrViewr app that I had written. You can search different user’s photos (or search all public photos by leaving the username blank).

updated: This app has been updated for Beta2.  All of its controls now use VSM!

updated: This app now uses DevDave’s AnimatingWrapPanel.

updated: Updated for Silverlight 3.

FlickrViewr (app, code)

In order to run it on your own, you need to go to flickr and get your own flickr api key.

Special thanks to Pete Blois.  I expanded upon his Xml Serialization Flickr library.  :)

This FlickrViewr application uses:

  • Styles
  • Control Templates
  • UserControls
  • Custom Controls

There are also a few re-usable goodies:

  • HorizontalWrapPanel  (note: the app no longer uses this wrap panel)
  • ContinuousProgress control
  • ModalDialog

You can grab these separately here.

Mix08: Creating Rich, Dynamic User Interfaces with Silverlight 2 Controls

Thanks everyone who came to my talk Thursday morning! (And to those brave souls who came to the 5:45pm repeat.)

The session video is now posted on the Mix site.

I’ve also uploaded the sample code and deck, if you’re interested. (I’ll post my flickr viewer app soon in a different post.)

DeckTitle

Some other links…

And a few more…. (that I shameless stole from Tim. See his post for some installation hints.):

Hope everyone enjoyed the rest of their time in Vegas. Sadly, mine was a bit too eventful. I ended up leaving my Mix bag by the pool… Which had my wallet in it. I guess some things really will “stay in Vegas”…

I Saw Elvis!

Mix 08: Silverlight Sessions

Mix08 has started in Vegas!

Mix08

Below are some of the Silverlight talks given by members of the Silverlight development team (plus one from some friends who now work at IdentityMine). I highly recommend checking these out if you’re at Mix!

My talk – Building Rich, Dynamic User Interfaces with Silverlight 2 Controls – is on Thursday at 10:15am. I’ve been prepping it and I think it should be good…. but you can help me out by crossing your fingers just in case. :)

On a side note: The bags that usually are given away at conferences are super ugly. But whoever did the Mix08 bags did a great job. I’m actually going to use mine!

The Mix08 Bag

Silverlight sessions from the Silverlight development team:

**Wednesday, March 5**

T13
Working with Data and Web Services in Microsoft Silverlight 2

1:30 PM – 2:45 PM, Delfino 4105
Speaker: Eugene Osovetsky

Learn how easy it is to utilize POX, REST, RSS, ATOM, JSON, and SOAP in your Microsoft Silverlight mashup applications. Also learn how to easily access and display data with Silverlight using LINQ and databinding.

CT01
Building Rich Internet Applications Using Microsoft Silverlight 2, Part 1

March 5 3:00 PM – 4:15 PM, Lando 4201
Speakers: Mike Harsh, Joe Stegman

Learn how to use Microsoft Visual Studio to create applications, how to create UI using XAML markup and code, how to build a custom control, how to retrieve data from a Web service, and how to manipulate data with XML and LINQ. (Part 1 of 2)

CT02
Building Rich Internet Applications Using Microsoft Silverlight 2, Part 2

4:30 PM – 5:45 PM, Lando 4201
Speakers: Mike Harsh, Joe Stegman

Learn how to use Microsoft Visual Studio to create applications, how to create UI using XAML markup and code, how to build a custom control, how to retrieve data from a Web service, and how to manipulate data with XML and LINQ. (Part 2 of 2)

**Thursday, March 6**

BCT05
Integrating Media in Silverlight Applications

8:30 AM – 9:45 AM, San Polo 3501A
Speaker: Ed Maia

Come learn how to incorporate media into Microsoft Silverlight applications including video playback capabilities and programmatic control of the media display. Also learn about the new content protection features of Silverlight, including the proper workflow for implementing content protection and integrity.

T20
Creating Rich, Dynamic User Interfaces with Silverlight 2 Controls

Thursday, March 6 10:15 AM – 11:30 AM, Lando 4204
Speaker: Karen Corby

See how to use the Microsoft Silverlight 2 control model to efficiently design and develop custom controls, style existing controls, create control templates, and package your controls for re-use to develop Rich Internet Applications. Also hear about the capabilities for accessibility.

**Friday, March 7**

BC01
Nerd + Art: Ten Code Snippets to Empower Your Inner Artist

10:00 AM – 11:15 AM, Lando 4201
Speakers: Nathan Dunlap (Identity Mine), Robby Ingebretsen(Identity Mine)

Learn how to increase what a designer can do with Windows Presentation Foundation and Microsoft Silverlight 2 using our designer’s code “toolbox”-10 simple concepts that will give you an edge when making your best ideas a reality. We share the code, teach you how to use it and introduce the concepts behind it.

Mix08!

Mix08 has been announced!

 

March 5 to 7, 2008

The Venetian Resort Hotel Casino

Las Vegas, Nevada