This is a mirror of official site: http://jasper-net.blogspot.com/

Creating your First Silverlight Client Application: Twitter and COM, of course

| Sunday, May 30, 2010
I'm creating some "create your first" videos for MSDN, and thought it would be useful to offer up a text version of the Out-of-Browser one in addition to the video. In this example, we'll build a simple Twitter Search client, using Silverlight out-of-browser mode. I'll also show how to use the Automation (IDispatch) API to load the search results into Microsoft Excel.
XAML

The XAML for this demo includes just a simple page with one button and a listbox. The button is there to retrieve the tweets, the listbox to display them. No data templates yet.

<UserControl x:Class="SilverlightApplication50.MainPage"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
   mc:Ignorable="d"
   d:DesignHeight="300" d:DesignWidth="400"
            xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">

   <Grid x:Name="LayoutRoot" Background="White">
       <Button Content="Get Tweets"
               Height="23"
               HorizontalAlignment="Left"
               Margin="12,12,0,0"
               x:Name="GetTweets"
               VerticalAlignment="Top"
               Width="75"
               Click="GetTweets_Click" />
       <ListBox x:Name="TweetList"
                Margin="12,41,12,12"/>
   </Grid>
</UserControl>

Read more: 10REM.NET

Posted via email from jasper22's posterous

0 comments: