Rants Tagged with “Silverlight”

<<  <  1  2  3  4  5  6  7  8  9  10  11  +  >  >>  (Total Pages: 14/Total Results: 132)

New Servers and a favor...

Its been a crazy weekend.  I've moved into my new servers at MaximumASP and I could not be happier.  On the new server, I have full control over the box so I can make it work the way it should have. In the old system, I was doing all sort of re-routing tricks to host 8 sites under a single web site.  It was a nightmare that made it difficult to use new technology (e.g. if the root site was using AJAX 1.0, I couldn't have one of the sub sites use 3.5).  All that is over and hopefully you will see some new stuff on this site soon!  .

Here comes the favor...there is likely some parts of the site that do not work as they did on the other server because I missed a file or two in the transfer...if you see anything that should work that doesn't, please email me at shawn@wildermuth.com

One thing I noticed was that when using the VS 2008 Publish function, some files were inexplicably not transferred.  It may have been the "Content" type or the Silverlight links in some of the project...I don't know.  But I've attempted to find all the holes that the "Publish"'s missed but I could have skipped something. 

Lastly, this new server has come at the kindness of Maximum ASP.  They have graciously offered to give me a machine at a discount for my community sites including this one, GeekDinners.com, SilverlightData.com and SilverlightGuy.com (not all of these are active yet).

Last note: GeekDinners.com is almost fully functional.  Look for an announcement this week when you can register your own GeekDinners and schedule event nights!

"A Taste of Silverlight" in Dallas is Filling Quickly!

Wow, after only 24 hours, the Dallas "A Taste of Silverlight" is already getting full.  If you want to attend, please register now. As of 6pm EST, there were only 14 seats (out of 32) left!

Free Silverlight Seminar in Dallas, TX

Silverlight Float

The Silverlight Tour is proud to announce "A Taste of Silverlight" to be held on February 18, 2008 in Dallas, TX. Shawn Wildermuth is bringing his Silverlight chops to Dallas to discuss the big picture of Silverlight and answer the following questions:

  • Why should I care about Silverlight
  • What is Silverlight?
  • When should I use Silverlight?
  • What is the Silverlight story on the Server?
  • How do developers and designers work together?

This event takes place in the afternoon of February 18th (starting at 1pm) at the Microsoft Office in Dallas. 

There are only 32 seats available for this free event so sign up early! You can see event details and register at www.silverlight-tour.com/freesignup.aspx.

 

Getting Silverlight XAML Intellisense in VS2008

bad intellisense

I've gotten the question a number of times about problems getting intellisense with Visual Studio 2008. If your XAML looks like this in Visual Studio 2008 then I can help you:

 

 

 

 

right click menu

The problem stems from the fact that VS2008 wants to open .xaml files in the WPF Designer. Instead you can get intellisense and a better-faster experience if you open your Silverlight XAML files in the XML Editor.  Most people assume that the intellisense is the lack of the Silverlight XSD file in the installation, but in fact VS2008 includes the Silverlight XSD document (but is unaptly named WPFE.XSD). To solve the problem of opening the file in th wrong editor, right click your XAML file in the solution explorer and pick "Open With..." (see right).

 

 

 

Open With... Dialog

Once that dialog is open, you can pick the "XML Editor" and it will open the file with full intellisense.  I usually click the "Set Default" button as well to always open XAML files (for both WPF and Silverlight) in the XML editor.  I use Blend to edit these files and I am not a big fan of the built-in editor (as it seems to be designed mostly for Windows Forms developers to create simple experiences.  You can see the "Open With..." dialog below:

Let me know if you have any questions!

iGoogle Gadget Written in Silverlight

Silverlight

I've written a quick example of a Google Gadget.  There is nothing really special about it as its hosted in an IFrame so that I could get at local assets (like my RSS feed) to the Gadget.  It isn't a lot to look at, but if anyone is interested in the process or want to add it to their iGoogle page, feel free.  Here's the Gadget in action:


UPDATE: The BrowserHttpWebRequest doesn't look like it works right in Firefox (though the control does render). I'll have to look into it, but I think it may be a bug (since I am using Silverlight 1.1 in this case).

ANOTHER UPDATE: Should be working for Firefox now.  I found an oddity I am still trying to work out.

MIX08

Mix 08

I am headed to MIX 08 this year. I didn't make the cut of speakers but I hope to spend most of my time in Vegas away from the Poker tables.

As a bunch of bloggers have mentioned, MIX is a shiny version of the PDC (as far as I am concerned)...so its a great place to learn about Microsoft's web strategies and alignment with design.  These include:

I am hoping to do a informal drink night while I am there but I am not sure how it will shape up. If you are going to MIX and want to meet up for beer and geek talk, reply to this message and i'll see what I can work out.

Manipulating Storyboards at Runtime with Silverlight 1.1

Silverlight

In response to a question posed on Silverlight.net's forums I crufted up a quick example of how to modify a Storyboard at runtime with Silverlight 1.1 (soon to be 2.0). The question was about both modifying the values of individual keyframes of but also changing the Storyboard's TargetName. Its driven by the ability to re-use Storyboards/Animations for multiple XAML elements.

I started with some simple XAML...three images placed near the top of the page. I want to have a storyboard with two animations; one for Canvas.Left and one for Canvas.Top. Here's the XAML I used:

...
<Canvas.Resources>
  <Storyboard x:Name="theMover" Storyboard.TargetName="Image1">
    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" 
                     Storyboard.TargetProperty="(Canvas.Left)">
      <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
      <SplineDoubleKeyFrame KeyTime="00:00:02" Value="386"/>
    </DoubleAnimationUsingKeyFrames>
    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" 
                     Storyboard.TargetProperty="(Canvas.Top)">
      <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
      <SplineDoubleKeyFrame KeyTime="00:00:02" Value="127"/>
    </DoubleAnimationUsingKeyFrames>
  </Storyboard>
</Canvas.Resources>
<Image x:Name="Image1" Source="sllogo.jpg" 
       Canvas.Top="8" Canvas.Left="8" />
<Image x:Name="Image2" Source="headshot.jpg" 
       Canvas.Left="154" Canvas.Top="8" />
<Image x:Name="Image3" Source="aglicense.jpg" 
       Canvas.Left="380" Canvas.Top="8" />
...

Now I wanted to have a handler in the code that when I clicked on a button to switch the animation between the three images and set the values of the storyboard.  First I setup an array of the Images so I can switch between them simply:

Image[] _images;
int _currentImage = 0;
Random _rnd = new Random();

public void Page_Loaded(object o, EventArgs e)
{
  // Required to initialize variables
  InitializeComponent();

  theButton.MouseLeftButtonUp += 
    new MouseEventHandler(theButton_MouseLeftButtonUp);

  _images = new Image[] { Image1, Image2, Image3 };
}

Next I handle the Mouse event and modify the Storyboard and kick it off:

void theButton_MouseLeftButtonUp(object sender, MouseEventArgs e)
{
  // Stop the Storyboard (to ensure its stopped)
  // We can't change anything while its running
  theMover.Stop();

  // Set the TargetName
  theMover.SetValue<string>(Storyboard.TargetNameProperty, 
                            _images[_currentImage].Name);

  // Set random Values for the Canvas.Left Animation
  DoubleAnimationUsingKeyFrames leftAnimation = 
       (DoubleAnimationUsingKeyFrames)theMover.Children[0];
  leftAnimation.KeyFrames[0].Value = _rnd.Next(400);
  leftAnimation.KeyFrames[1].Value = _rnd.Next(400);
  
  // Set random Values for the Canvas.Left Animation
  DoubleAnimationUsingKeyFrames topAnimation = 
       (DoubleAnimationUsingKeyFrames)theMover.Children[1];
  topAnimation.KeyFrames[0].Value = _rnd.Next(400);
  topAnimation.KeyFrames[1].Value = _rnd.Next(400);

  // Start the Animation
  theMover.Begin();

  // Change the counter so it picks the next image next time
  if (_currentImage < 2) _currentImage++;
  else _currentImage = 0;
}

It isn't elegant, but it does work so if you want to re-use a Storyboard grab the sample and get going!

Interviewed for the CS Tech Podcast on Silverlight

I was interviewed a few days ago on Silverlight and though i'd share the link. This is a very short interview with me to discuss Silverlight for the novice. If you want to get your big pictures answered, this Podcast might be for you!

 

Silverlight-Based SeeqPod Player

Silverlight

Over the last few weeks I became interested in SeeqPod.  Essentially it is a site that crawls the web and looks for open music files on servers.  It has impleneted a search page and a search API.  The SeeqPod site uses a Flash player to play the found music.  I decided to use their API and create my own player using Silverlight

The result is a little Silverlight app that shows off a couple of interesting techniques:

  • Uses WCF's REST stack to retieve results from a site's web service and feed the results to a Silverlight app.
  • Layering of HTML controls over a Silverlight control including supporting the Enter key to access the Silverlight control.
  • Exposes managed code to JavaScript to allow searches to be performed from JavaScript (the app is written in Silverlight 1.1 Alpha).
  • Shows several control written in Silverlight 1.1 and shows nesting of controls in other controls.

Take a look when you have a chance and i'd love any feedback you have.  The source code is available on the SilverlightPod page.

The Silverlight Tour is Going all 2.0

Silverlight Logo

The Silverlight Tour is going all Silvelright 2.0.  The first class after MIX (Dallas, TX) will Silverlight 2.0 material only.  While the new workshop will cover in brief detail the Silverlight 1.0 JavaScript integration, it will be highly focused on development using Silverlight 2.0. 

visit mix

I plan to have the new 2.0 outline up on the Silverlight Tour site by the end of the week. Its an exciting time for Silverlight.  If you haven't made the jump yet, watch for the new version to be announced at MIX and dive in with your mad C#/VB.NET skillz!