Permalink
Browse files

Update PhotoSkyOnTheGo

Add check for ClientId place holder
Update project to LiveSDK v5.2
  • Loading branch information...
Simon Krueger
Simon Krueger committed Jul 11, 2012
1 parent 72f2462 commit 638e5ae3f8bc64799f99be4ffc76fbcf0ba9df7a
@@ -31,18 +31,19 @@
<StackPanel Grid.Row="0" Orientation="Vertical" d:LayoutOverrides="Height">
<TextBlock Text="{Binding FullName}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" Height="100"/>
<Image Source="{Binding ProfileImage}" Height="200" Width="200" Margin="50" />
- </StackPanel>
+ <TextBlock Height="120" Name="infoTextBlock" Text="" TextWrapping="Wrap" />
+ </StackPanel>
<live:SignInButton
- ClientId="PLACE_YOUR_CLIENT_ID_HERE"
+ Name="signInButton"
+ ClientId="PLACE YOUR CLIENT ID HERE"
Scopes="wl.basic wl.photos wl.skydrive wl.offline_access wl.signin wl.skydrive_update"
Branding="Skydrive"
TextType="SignIn"
Grid.Row="1"
Margin="114,8,145,8"
d:LayoutOverrides="VerticalAlignment"
- SessionChanged="SignInButton_SessionChanged"
- />
+ SessionChanged="SignInButton_SessionChanged" />
</Grid>
</controls:PivotItem>
<controls:PivotItem x:Name="albumPivot" Header="album">
@@ -23,8 +23,21 @@ public MainPage()
InitializeComponent();
// Set the data context of the listbox control to the sample data
DataContext = App.ViewModel;
+ Loaded += MainPage_Loaded;
}
-
+
+ private void MainPage_Loaded(object sender, RoutedEventArgs e)
+ {
+ Loaded -= MainPage_Loaded;
+ if (signInButton.ClientId == "PLACE YOUR CLIENT ID HERE")
+ {
+ signInButton.Visibility = Visibility.Collapsed;
+ infoTextBlock.Text = "In order to use the sample, you must first place your client id " +
+ "in MainPage.xaml. " +
+ "For more information see http://go.microsoft.com/fwlink/?LinkId=220871";
+ }
+ }
+
private void SignInButton_SessionChanged(object sender, LiveConnectSessionChangedEventArgs e)
{
if (e.Session != null && e.Status == LiveConnectSessionStatus.Connected)
@@ -50,8 +50,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Microsoft.Live, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
- <Reference Include="Microsoft.Live.Controls, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.Live, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.Live.Controls, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Phone" />
<Reference Include="Microsoft.Phone.Controls" />
<Reference Include="Microsoft.Phone.Controls.Toolkit">
@@ -127,4 +127,4 @@
</Target>
-->
<ProjectExtensions />
-</Project>
+</Project>

0 comments on commit 638e5ae

Please sign in to comment.