Click here to Skip to main content
15,896,402 members
Articles / Desktop Programming / WPF

Getting Started with Facebook Desktop (Client) Applications, C#, WPF / XAML and JSON

Rate me:
Please Sign up or sign in to vote.
4.92/5 (28 votes)
21 Jan 2009CPOL15 min read 320.8K   11.7K   139  
A take on getting started with the Facebook API and WPF
<Page x:Class="Facebook.Windows.WaitPage" Loaded="PageGrid_Loaded"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Page1" ShowsNavigationUI="False">
        <Grid x:Name="PageGrid">
         <!-- Simple animation to display a clock type wait effect -->
        <Ellipse Width="240" Height="240" x:Name="uiEllipseClockFace" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="BurlyWood" StrokeThickness="6">
            <Ellipse.Fill>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                    <GradientStop Color="Beige"/>
                    <GradientStop Color="Khaki" Offset="0.75"/>
                </LinearGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        <TextBlock Width="125" Height="20" x:Name="uiTbHourHand" Margin="125,20,0,0" VerticalAlignment="Center" FontFamily="Times" FontSize="18" FontWeight="Bold" HorizontalAlignment="Center">
                <TextBlock.RenderTransform> 
                    <TransformGroup>
                        <RotateTransform Angle="270" CenterX="0" CenterY="0"/> 
                        <RotateTransform x:Name="HourRotateTransform" Angle="0" CenterX="0" CenterY="0"/> 
                    </TransformGroup>
                </TextBlock.RenderTransform>
                <TextBlock.Triggers> 
                    <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                        <BeginStoryboard> 
                            <Storyboard> 
                                <DoubleAnimation Storyboard.TargetName="HourRotateTransform" Storyboard.TargetProperty="(RotateTransform.Angle)" From="0.0" To="360" Duration="0:0:10" RepeatBehavior="Forever" /> 
                            </Storyboard> 
                        </BeginStoryboard> 
                    </EventTrigger> 
                </TextBlock.Triggers>
             <Run Foreground="Brown" Text="Loading-&gt;"/>
        </TextBlock>

        <TextBlock Width="125" Height="20" x:Name="uiTbMinuteHand" Margin="125,20,0,0" VerticalAlignment="Center" FontFamily="Times" FontSize="18" FontWeight="Bold" HorizontalAlignment="Center">
                <TextBlock.RenderTransform> 
                    <RotateTransform x:Name="MinuteRotateTransform" Angle="0" CenterX="0" CenterY="0"/> 
                </TextBlock.RenderTransform><TextBlock.Triggers> 
                    <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                        <BeginStoryboard> 
                            <Storyboard> 
                                <DoubleAnimation Storyboard.TargetName="MinuteRotateTransform" Storyboard.TargetProperty="(RotateTransform.Angle)" From="0.0" To="360" Duration="0:0:05" RepeatBehavior="Forever" /> 
                            </Storyboard> 
                        </BeginStoryboard> 
                    </EventTrigger> 
                </TextBlock.Triggers>
             <Run Foreground="Brown" Text="Please wait-&gt;"/>
        </TextBlock>
    </Grid>
</Page>

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)


Written By
Architect
United Kingdom United Kingdom
You can read more about me here:

http://uk.linkedin.com/in/murrayfoxcroft

Comments and Discussions