Click here to Skip to main content
12,395,319 members (70,093 online)
Click here to Skip to main content

Stats

14.4K views
112 downloads
25 bookmarked
Posted

A Simple Solution to Some Problems with Asynchrony in Silverlight

, 9 Mar 2010 CPOL
A small, extensible suite of classes that elegantly solve some common problems involving asynchrony and event handling that tend to occur when Silverlight and WCF are used together.
<UserControl x:Class="TaskManagerDemo.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:DesignWidth="640" d:DesignHeight="480"
    MinWidth="640" Height="Auto">
  <Grid x:Name="LayoutRoot" HorizontalAlignment="Stretch">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="20" />
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="20" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <TextBlock x:Name="AppName" Text="City / ZIP Code Match Quiz :)" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,15,0,0" FontSize="14" HorizontalAlignment="Center" />
        <TextBlock x:Name="CityTextBlock" Text="Select City" Grid.Row="1" Grid.Column="1" Margin="0,0,0,10" />
        <ComboBox x:Name="CityComboBox" Grid.Row="1" Grid.Column="2" Margin="0,0,0,10" DisplayMemberPath="City" SelectionChanged="ComboBox_SelectionChanged" />
        <TextBlock x:Name="ZipCodeTextBlock" Text="Select ZIP Code" Grid.Row="2" Grid.Column="1" Margin="0,0,0,10" />
        <ComboBox x:Name="ZipCodeComboBox" Grid.Row="2" Grid.Column="2" Margin="0,0,0,10" DisplayMemberPath="ZipCode" SelectionChanged="ComboBox_SelectionChanged" />
        <Button x:Name="RefreshButton" Content="Refresh" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Margin="50,0,50,10" Click="RefreshButton_Click" />
        <TextBlock x:Name="IsZipCodeInCityTextBlock" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" />
    </Grid>
</UserControl>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

George Henry 1954
Software Developer (Senior) Concur
United States United States
George Henry has worked as a software developer for more than 20 years. He is currently employed by Concur in Bellevue, Washington, USA.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160721.1 | Last Updated 9 Mar 2010
Article Copyright 2009 by George Henry 1954
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid