Welcome to MSDN Blogs Sign in | Join | Help

How to access SharePoint List data with Visual Studio 2010 and WPF

Steve Fox walks you through the process of building a WPF application using Visual Studio 2010 Beta 1 to access SharePoint 2007 List data. Using the newest version of Visual Studio, C#, Linq, XML, and SharePoint web services to pull a List from the server and display it on the client.

Check out the post for all of the source code.

Retrieve SharePoint List Data with XLINQ using VS 2010 Beta 1 

image

Posted by pstubbs | 1 Comments

Download XNA Game Studio 3.1 with Avatar Support

XNA Game Studio 3.1 is available now for download. Although v3.1 has a number of cool new features like XBOX Live Party support and video playback. I think for me the most exciting feature is support for Avatars.

This will allow you to render 3D models of your Avatars and use them within your own games. For an example of what could be possible see the upcoming XBLA game JoyRide.

Check out the XNA Creators Club Online for all of the details of the 3.1 release.

Also here is a detailed breakdown at what’s new.

Be your Avatar

Here are some other games where your Avatar is the star.

Age of Booty

UNO RUSH

TRIVIAL PURSUIT

Brain Challenge

UNO

Scene It? Box Office Smash

Kingdom for Keflings

Hardwood Hearts

Bomberman LIVE

Hardwood Spades

See your Avatar

If you want to use your avatar’s image on your blog, in your IM or on your Facebook you can easy link to it using the following URLs.(Terms of Use apply)

avatar.xboxlive.com/avatar/(gamertag)/avatar-body.png

avatar.xboxlive.com/avatar/(gamertag)/avatarpic-l.png

avatar.xboxlive.com/avatar/(gamertag)/avatarpic-s.png

So for my avatar the links would render the following images. TIP: If your gamertag has spaces make sure you add those to the URL as well.

Free your Avatar

The XBOX.com site has a cool new tool called Free Your Avatar. This will allow your Avatar to strike a pose. This app is another example of the fun non-game things you can do with your avatars. Who out there is going to be the first to create a Sims clone using only avatars and XNA Game Studio 3.1?

image

Program your Avatar

Avatars 101 is a great blog post about getting starting with your Avatars. There are many good links to resources and information. So if you are ready to jump in here is the place to start.

Posted by pstubbs | 1 Comments
Filed under: ,

Wii Researcher comes to Natal

Johnny Chung Lee who is famous for his Wii-mote hacks has been working on Project Natal. Project Natal on the XBOX 360 is going to be a game changer.

Here is an interview with Johnny on Channel 9.

image

 Read Ina Fried’s detailed reporting on this.

Posted by pstubbs | 0 Comments

What Do Geneva, Dublin, Stirling, Velocity and Madison Have in Common?

Geneva, Dublin, Stirling, Velocity and Madison are all code names of upcoming Microsoft products and technologies talked about at TechEd 2009. (which one is not a city?)

Bruce Kyle has pulled together links to all of these and more in his recent blog post. He also lays out the projected timeline for their release.

http://blogs.msdn.com/usisvde/archive/2009/05/15/roadmaps-for-major-products-announced-at-teched.aspx

This post is a great resource that I will add to my bookmarks. A quick reference to all the of the cool technology coming out of Redmond in the next year and beyond.

image

image

image

image

Posted by pstubbs | 1 Comments

How to get Visual Studio 2010 and .NET FX 4 Beta 1

Today Soma announced that VS 2010 and .Net FX 4 Beta 1 has shipped. If you are a MSDN/Technet subscriber you can download right now. The rest of us can download the bits on Wednesday.

Subscriber download page for VS 2010:

http://msdn.microsoft.com/en-us/subscriptions/downloads/default.aspx?pv=18:370

For more details visit the  Visual Studio 2010 Product Page

Posted by pstubbs | 2 Comments

How to get a copy of Office 2010 technical preview

More details have been coming out of TechEd 2009 this week. One of the cool announcements is that the Office 2010 technical preview is just around the corner. This will be closed release. If you were lucky enough to go to TechEd you are first in line. But there is still hope for the rest of us. Run, don’t walk to this site and signup to get on the list.

Signup for the Office 2010 preview:

https://microsoft.crgevents.com/Office2010TheMovie

The following applications will be part of the preview.

  • Word 2010
  • Excel 2010
  • Outlook 2010
  • PowerPoint 2010
  • OneNote 2010
  • Access 2010
  • InfoPath 2010
  • Publisher 2010
Posted by pstubbs | 2 Comments

SharePoint 2010 and SQL Server better together

Today the SharePoint team announced that SQL Server will be a prerequisite for SharePoint 2010. It was also announced that SharePoint will only come in the 64-bit version. So that means 64-bit SQL (2005 or 2008) and 64-bit SharePoint. Also SharePoint will require Windows Server 2008 or Windows Server 2008 R2, which only comes in a 64-bit versions.

This announcement is well ahead of the availability of SharePoint to give you time to prepare. Most medium to large scale SharePoint deployments are already running on this 64-bit configuration today with SharePoint 2007, as it is the current best practice. You should also use the SharePoint 2010 Upgrade Checker that shipped recently as part of SharePoint SP2. The upgrade checker will help you identify potential upgrade issues and blockers.

The last part of the announcement was around the set of supported browsers. IE 6.0 will no longer be supported with SharePoint 2010. Again you have some time to prepare if you company is still using IE6.

To recap the SharePoint 2010 announcement:

  1. 64-Bit Only.
  2. SQL Server (2005/2008) and Windows Server 2008 (R2) Required.
  3. IE7 and above (see post for other supported browsers).

Arpan’s blog has a couple of good links to running and migrating to a 64 bit SharePoint 2007 environment.

Posted by pstubbs | 3 Comments

Looking to keep up with SharePoint?

SharePoint is a huge product. The SharePoint community is one of the biggest and most active. So one question I get frequently is “How do I keep up to date with what’s going on.” I have found that using Alltop has been a huge help. This site aggregates the most important SharePoint blogs into one page that makes it super easy to stay informed.

image 

http://SharePoint.Alltop.com/

 

Thanks to Guy for providing a great resource.

Posted by pstubbs | 3 Comments

Where to Download SharePoint 2007 Service Pack 2 (SP2)

Today the SharePoint team announced that Service Pack 2 is ready to go. SP2 rolls up all previous bug fixes and patches. SP2 also includes new features to improve performance, availability and stability. SP2 also prepares your SharePoint farm to make the upgrade to SharePoint 2010 when it is available.

Where do I get it?

Check out the SharePoint team blog for all of the details and links to all of the download locations.

http://blogs.msdn.com/sharepoint/archive/2009/04/28/announcing-service-pack-2-for-office-sharepoint-server-2007-and-windows-sharepoint-services-3-0.aspx

What's in there?

Read the Overview details in this document: Service Pack 2 for SharePoint Products and Technologies Overview Document

Service Pack 2 provides fixes for known issues and improves existing functionality in the following product areas:

· Authentication — Improvements to forms-based authentication, authentication for Web applications, and the Business Data Catalog.

· Database performance and integrity — Improved database performance and integrity by automatically rebuilding database indexes with a timer job.

· Interoperability — Improved support for standards-based document formats and compatibility with a broader range of browsers level 1 and level 2 browser support.

· Read-only content databases — Improved user experience by automatically configuring site collections as read-only when the content database is configured as read-only.

· Stsadm command-line tool — In addition to operations for pre-upgrade scanning and variations analysis and repair, several operations are improved and new operations added to better support farm administration.

· Pre-upgrade scanning and reporting — An Stsadm operation that enables you to scan an existing farm and its servers to verify that they can be upgraded SharePoint Products and Technologies "14".

· Variations analysis and repair — An Stsadm operation that enables farm administrators to better manage and perform necessary operations against variations.

Posted by pstubbs | 2 Comments

Ramp Up your SharePoint Developer Skills

Are you a developer looking to expand your skills and marketability with SharePoint? SharePoint has a large surface area which can be intimidating for people just starting out. Take this free online SharePoint course to get up to speed quickly.

Ramp Up 

Where do you begin?

A good place to start is with the Ramp Up free online training courses. The training is a good mix of Documents, Slides, Videos, walkthroughs and hands on labs. The site also allows you to track your progress and manage your learning.

SharePoint for Developers - Part 1

  • Web Parts
  • Data Lists
  • Event Handlers
  • Workflow
  • Silverlight Web Parts

SharePoint for Developers - Part 2

  • Page Navigation
  • Page Branding
  • Web Services
  • Custom Content Types
  • User Management

Get started today with your SharePoint career! SharePoint skills are white hot right now.

Posted by pstubbs | 3 Comments

SharePoint SP2 adds support for IE8

Office 2007 SP2 is just around the corner. One of the many improvements is support for Internet Explorer 8. The Office team blog announced today that the Office SP2 and the documentation will ship on April 28th.

http://blogs.technet.com/office_sustained_engineering/archive/2009/04/16/service-pack-2-for-the-2007-microsoft-office-system-due-to-ship-april-28th.aspx

The post includes a long list of features and improvements for both the server apps such as SharePoint and the client apps like Word and Excel. It is also good to hear that they will be bringing back the spreadsheet that enumerates all of the bugs that were fixed.

It is nice to see the Office sustained engineering team hit their ship target dates. So often only the slips are reported. Good job!

Posted by pstubbs | 1 Comments

Generate Online Training Courses with Silverlight and SharePoint

SharePoint is a great collaboration platform for training and online courses. Steve Fox posts an example of using SharePoint with a rich Silverlight UI to generate and consume online training courses.

Check out some of the screen shots at his blog.

Silverlight and SharePoint made Real

The LearningPoint for SharePoint system allows you to:

  1. Administer courses and users
  2. Design and create courseware
  3. Launch courses
  4. Collaborate on courses

image

Posted by pstubbs | 2 Comments

SharePoint 14 now officially SharePoint 2010

Office 14 and SharePoint 14 have been given their official product names, Office 2010. There will be a Beta later this year with RTM coming in the first half of 2010.

See the official interview for more details:

http://www.microsoft.com/presspass/features/2009/Apr09/04-15Office2010.mspx

Posted by pstubbs | 2 Comments

Silverlight 3: What's New with Out of Browser

This is the fourth post in a series where I will be walking through some of the new features in Silverlight 3. I enjoyed reading Tim Sneath’s blog post, http://visitmix.com/Opinions/Whats-New-in-Silverlight-3 but as I read the post I kept saying cool, but how do I do it. So in these posts I will try to answer the “how do I” questions around the new features.

Let’s get started.

Out of Browser

Today the host for Silverlight applications is a web browser. The new out of browser feature in Silverlight 3 allows you to break free of the browser and run the application out of the browser. Your Silverlight Out of Browser (SLOOB) will have a link on the desktop or the start menu. This works for both Macs and PCs. This will cache the XAP locally, enabling you to launch the SLOOB even if you are offline. Of course this requires that the Silverlight developer code the application to detect offline status and work with data in isolated storage. Luckily Silverlight provides APIs that make this easy for the developer to be offline aware. The SLOOB applications will run with the same security sandbox as the browser and will auto-update when a new version is detected.

Create a new Silverlight project

In order to create Silverlight 3 projects you will need to install Visual Studio 2008, and the Silverlight 3 SDK and tools. Create a Silverlight C# project called "SLOOB" and accept the defaults which will create 2 projects in the solution.

Create the UI

The UI for this app will consist of a couple of labels to display some text and the online status of the application.

<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    x:Class="SLOOB.MainPage" 
    Width="400" Height="300" Background="Bisque" mc:Ignorable="d">

    <Grid x:Name="LayoutRoot" Background="White">

        <controls:Label Height="44" Margin="32,8,48,0" VerticalAlignment="Top" 
                        Content="Out of Browser Test.&#xd;&#xa;" FontSize="20"/>
        
        <controls:Label x:Name="InstalledLabel" Margin="8,68,8,0" 
                        Content="Installed Status" FontWeight="Bold" FontSize="24" 
                        VerticalAlignment="Top" Height="44"/>
        
        <controls:Label x:Name="OOBLabel" Margin="8,112,8,144" 
                        Content="Out of Browser Status" FontWeight="Bold" FontSize="24"/>
        
        <controls:Label x:Name="OnlineLabel" Margin="8,0,8,100" 
                        Content="Online Status" FontWeight="Bold" FontSize="24" Height="44" 
                        VerticalAlignment="Bottom"/>
        
        <Button x:Name="InstallButton"
            Content="Install Locally" 
            Click="OnClicked" 
            Margin="0,0,17,8" Width="100" Height="30" 
            HorizontalAlignment="Right" VerticalAlignment="Bottom" 
            d:LayoutOverrides="Width, Height"/>

    </Grid>
</UserControl>
Enable Out of Browser

You will need to turn on the out of browser feature by editing the appmanifest.xml file (located in the Properties folder in your Visual Studio project)

By default the config file has the out of browser section (Deployment) commented out.

<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
    <Deployment.Parts>
    </Deployment.Parts>

    <!-- Uncomment the markup and update the fields below to make your application offline enabled
    <Deployment.ApplicationIdentity>
        <ApplicationIdentity 
            ShortName="Out of Browser Silverlight Application" 
            Title="Window Title of Your Silverlight Application">
            <ApplicationIdentity.Blurb>Description of your Silverlight application</ApplicationIdentity.Blurb>
        </ApplicationIdentity>
    </Deployment.ApplicationIdentity>
    -->
</Deployment>

Uncomment the commented node to turn on out of browser support.

<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
    <Deployment.Parts>
    </Deployment.Parts>

    <!-- Uncomment the markup and update the fields below to make your application offline enabled
    -->
    <Deployment.ApplicationIdentity>
        <ApplicationIdentity 
            ShortName="Out of Browser Silverlight Application" 
            Title="Window Title of Your Silverlight Application">
            <ApplicationIdentity.Blurb>Description of your Silverlight application</ApplicationIdentity.Blurb>
        </ApplicationIdentity>
    </Deployment.ApplicationIdentity>
</Deployment>

Running the app you will now see that the right-click menu is enabled.

image

Select ok on the install dialog.

image

Detect Installed Status

You can detect if the app is installed locally. You can check the ExecutionState property of the App object. I found the state of RunningOnline or Detached to be confusing. This is the installed state of the app not the network connectivity status of the application.

//Is the SL App installed
if (App.Current.ExecutionState == ExecutionStates.RunningOnline)
{
    InstalledLabel.Content = "App is NOT Installed locally";
}
else
{
    InstalledLabel.Content = "App is Installed locally";
}

You can listen for the ExecutionStateChanged event. This will fire when the app is installed or uninstalled.

App.Current.ExecutionStateChanged += OnExecutionStateChanged;
Detect the In Browser or Out of Browser instance

The instance of the application you are running is important you need to be aware of which instance you are running. For example the OOB instance will not have access to the HTMLBridge of the webpage. This is easy enough to detect. The App object has a Boolean property called RunningOffline. If this is true you are in the OOB instance.

//Which instance is running
if (App.Current.RunningOffline)
    OOBLabel.Content = "App is Out of Browser";
else
    OOBLabel.Content = "App is IN Browser";
Detect Online Status

It is important to understand when you are connected and when you are offline. This as it turns out is a hard problem. There is a great talk about this by Peter Smith.

Offline Detection in Silverlight 3 : http://videos.visitmix.com/MIX09/T78M

To know if you are online requires answering 2 questions:

1. Can you connect to your server?

2. Have you validated the response?

Debugging your SLOOB

Debugging your OOB instance of the app requires that you manually attach to the process hosting the app, sllauncher.exe. Once you attach you can debug as you normally would.

image

 

All code

Here is the entire code file.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

using System.Net.NetworkInformation;

namespace SLOOB
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();

            SetStatusLabels();

            //detect install state
            App.Current.ExecutionStateChanged += OnExecutionStateChanged;

            //detect online/offline
            NetworkChange.NetworkAddressChanged += 
                OnNetworkChange;
        }

        void OnExecutionStateChanged(object sender, EventArgs e)
        {
            SetStatusLabels();
        }

        //fired whenever network connectivity changes
        void OnNetworkChange(object sender, EventArgs e)
        {
            SetStatusLabels();

        }

        void OnClicked(object sender, RoutedEventArgs args)
        {
            if (App.Current.ExecutionState == ExecutionStates.RunningOnline)
                App.Current.Detach();
        }

        void SetStatusLabels()
        {
            //Is the SL App installed
            if (App.Current.ExecutionState == ExecutionStates.RunningOnline)
            {
                InstallButton.IsEnabled = true;
                InstalledLabel.Content = "App is NOT Installed locally";
            }
            else
            {
                InstallButton.IsEnabled = false;
                InstalledLabel.Content = "App is Installed locally";
            }

            //Which instance is running
            if (App.Current.RunningOffline)
                OOBLabel.Content = "App is Out of Browser";
            else
                OOBLabel.Content = "App is IN Browser";

            //Are we connected?
            if (NetworkInterface.GetIsNetworkAvailable())
                OnlineLabel.Content = "Network is available";
            else
                OnlineLabel.Content = "Network is NOT available";


        }

    }
}
Posted by pstubbs | 1 Comments

Silverlight 3: What's New with Local Messaging

This is the third post in a series where I will be walking through some of the new features in Silverlight 3. I enjoyed reading Tim Sneath’s blog post, http://visitmix.com/Opinions/Whats-New-in-Silverlight-3 but as I read the post I kept saying cool, but how do I do it. So in these posts I will try to answer the “how do I” questions around the new features.

Let’s get started.

Local Messaging

Local Messaging provides cross Silverlight plug-in messaging. This will enable you to communicate between multiple controls on the same page. You can also communicate across browser tabs and even across browsers. String messages. You can only talk with other Silverlight controls from the same domain and if both controls opt-in to communicate. You can of course choose to open your control up to communicate with any control. This feature really opens up a world of cool composite applications. In my book, SharePoint Development using Silverlight 2.0, I demonstrate a technique to communicate between Silverlight controls on the same page using the HTMLBridge. But now with Silverlight 3 you can communicate across tabs and across browsers.

Create a new Silverlight project

In order to create Silverlight 3 projects you will need to install Visual Studio 2008, and the Silverlight 3 SDK and tools. Create a Silverlight C# project called "Local Messaging" and accept the defaults which will create 2 projects in the solution.

Create the UI

In this example I want to keep it super simple to let you see how the communication works. You will create a single form that has 2 text boxes, one for the local text and one for the remote text. Whatever you type in the local text box will be echoed in the remote text box.  Here is what the MainPage.xaml form will look like when you are finished.

image

Here is the xaml for the MainPage.xaml. The remote text box is readonly because it is set by the incoming message.

<UserControl
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
    x:Class="Local_Messaging.MainPage" 
    Width="400" Height="300">
    <Grid x:Name="LayoutRoot" Background="White">

        <TextBox x:Name="LocalText" 
                 Height="24" Margin="76,63,82,0" 
                 VerticalAlignment="Top" Text="Local Text" 
                 TextWrapping="Wrap" KeyUp="LocalText_KeyUp"/>
        <TextBox x:Name="RemoteText" 
                 Margin="76,144,82,132" Text="Remote Text" 
                 TextWrapping="Wrap" IsReadOnly="True"/>
        <controls:Label x:Name="LocalLabel" 
                        HorizontalAlignment="Left" Margin="76,43,0,0" 
                        VerticalAlignment="Top" Content="Local Text"/>
        <controls:Label x:Name="LocalLabel_Copy" 
                        HorizontalAlignment="Left" Margin="76,124,0,0" 
                        VerticalAlignment="Top" Content="Remote Text"/>

    </Grid>
</UserControl>
Get the end point names

Each endpoint requires a unique name. One of the easiest ways to set this name is to pass in the values as parameters to the Silverlight plug-in. Open the App.xaml.cs file and update the Application_Startup method. This passes the 2 params LocalName and RemoteName to the constructor of the MainPage.xaml.

private void Application_Startup(object sender, StartupEventArgs e)
{
    this.RootVisual = 
        new MainPage(e.InitParams["LocalName"], 
                     e.InitParams["RemoteName"]);
}
Update the constructor

Update the constructor of the MainPage.xaml.cs to get the startup parameters.

public partial class MainPage : UserControl
{
    string localName, remoteName;

    public MainPage(string localName, string remoteName)
    {
        InitializeComponent();

        this.localName = localName;
        this.remoteName = remoteName;
    }
}
Listen for incoming messages

Add the code to listen for incoming messages.

public MainPage(string localName, string remoteName)
{
    InitializeComponent();

    this.localName = localName;
    this.remoteName = remoteName;

    //Create a new message reciever with a local name passed into the plugin
    System.Windows.Messaging.LocalMessageReceiver incomingMessage =
        new System.Windows.Messaging.LocalMessageReceiver(localName);

    //Add an event handler for a new message
    incomingMessage.MessageReceived += incomingMessage_MessageReceived;

    //incomingMessage.MessageReceived += 
    //    new EventHandler<
    //        System.Windows.Messaging.MessageReceivedEventArgs>
    //        (incomingMessage_MessageReceived);
    
    //Start listening
    incomingMessage.Listen();
}

In this code I have left in the fully qualified name to show you that the LocalMessageReceiver is from the System.Windows.Messaging namespace. Also I have commented out the full event handler which is what is created from intellisense and replaced it with just the name of the eventhandler method. The code is very simple, Create a message receiver giving a unique name, then hook an event for incoming messages and finally start listening.

Handle the incoming message

When a new message arrives the event handler is called. The incoming message is passed to the event as a System.Windows.Messaging.MessageReceivedEventArgs object. Simply set the text of the remoteText textbox with the message property.

void incomingMessage_MessageReceived(object sender, System.Windows.Messaging.MessageReceivedEventArgs e)
{
    RemoteText.Text = e.Message;
}
Send a message

Sending a message is just as easy. Create a LocalMessageSender object with the unique name of the receiver of the message. The send is asynchronous so you can handle an event when the message has been sent. Finally just call the SendAsync method passing the message as a string.

private void LocalText_KeyUp(object sender, KeyEventArgs e)
{
    //Send a message
    string message = LocalText.Text;

    System.Windows.Messaging.LocalMessageSender outgoingMessage =
        new System.Windows.Messaging.LocalMessageSender(remoteName);

    outgoingMessage.SendCompleted += outgoingMessage_SendCompleted;
        
        //new EventHandler<
        //    System.Windows.Messaging.SendCompletedEventArgs>
        //    (outgoingMessage_SendCompleted);

    outgoingMessage.SendAsync(message);

}
Set the parameters for the Silverlight plugin

The last step is to modify the test aspx page to include 2 controls (local and remote) and set the parameters. I have also set the border color to make it easier to see the 2 controls. Change the Local MessagingTestPage.aspx with the following code. You can see in the code that I swap the local and remote names for the 2 controls.

<body>
    <form id="form1" runat="server" style="height:100%;">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div style="padding: 20px; margin: 20px; background-color: #FF0000">
            <asp:Silverlight 
            ID="SilverlightAppOne" 
            runat="server" 
            Source="~/ClientBin/Local Messaging.xap" 
            MinimumVersion="3.0.40307.0" 
            Width="100%" Height="100%"
            InitParameters="LocalName=AppOne,RemoteName=AppTwo"
             />
        </div>
        <div style="padding: 20px; margin: 20px; background-color: #0000FF">
            <asp:Silverlight 
            ID="SilverlightAppTwo" 
            runat="server" 
            Source="~/ClientBin/Local Messaging.xap" 
            MinimumVersion="3.0.40307.0" 
            Width="100%" Height="100%"
            InitParameters="LocalName=AppTwo,RemoteName=AppOne"
             />
        </div>
    </form>
</body>
 
Run the App

This demonstrates the controls communicating with each other on the same page.

image

Communicate across tabs

You are not restricted to the same page. You can also communicate across browser tabs.

image image

Communicate across browsers

Not only can you communicate intra-page, but across tabs and across different browsers

Joe Stegman has a great demo of the Silverlight Chess application battling across different browsers.

http://blogs.msdn.com/jstegman/archive/2009/03/23/local-messaging-samples.aspx

image

Advanced / Security

You can also control the domains that you receive messages from. There is an overload for the LocalMessageReceiver class that allows you to pass the scope of the name of the receiver and a collection of valid domains.

Posted by pstubbs | 1 Comments
More Posts Next page »
 
Page view tracker