Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Apress committed Oct 16, 2016
0 parents commit 70d599c
Show file tree
Hide file tree
Showing 194 changed files with 20,895 additions and 0 deletions.
Binary file added 9781430250340.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,27 @@
Freeware License, some rights reserved

Copyright (c) 2012 Adam Freeman

Permission is hereby granted, free of charge, to anyone obtaining a copy
of this software and associated documentation files (the "Software"),
to work with the Software within the limits of freeware distribution and fair use.
This includes the rights to use, copy, and modify the Software for personal use.
Users are also allowed and encouraged to submit corrections and modifications
to the Software for the benefit of other users.

It is not allowed to reuse, modify, or redistribute the Software for
commercial use in any way, or for a user�s educational materials such as books
or blog articles without prior permission from the copyright holder.

The above copyright notice and this permission notice need to be included
in all copies or substantial portions of the software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


15 changes: 15 additions & 0 deletions README.md
@@ -0,0 +1,15 @@
#Apress Source Code

This repository accompanies [*Windows 8 Apps Revealed Using XAML and C#*](http://www.apress.com/9781430250340) by Adam Freeman (Apress, 2012).

![Cover image](9781430250340.jpg)

Download the files as a zip using the green button, or clone the repository to your machine using Git.

##Releases

Release v1.0 corresponds to the code in the published book, without corrections or updates.

##Contributions

See the file Contributing.md for more information on how you can contribute to this repository.
46 changes: 46 additions & 0 deletions Source Code/Chapter 1/GrocerApp/GrocerApp.sln
@@ -0,0 +1,46 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows 8
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrocerApp", "GrocerApp\GrocerApp.csproj", "{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|ARM.ActiveCfg = Debug|ARM
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|ARM.Build.0 = Debug|ARM
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|ARM.Deploy.0 = Debug|ARM
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|x64.ActiveCfg = Debug|x64
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|x64.Build.0 = Debug|x64
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|x64.Deploy.0 = Debug|x64
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|x86.ActiveCfg = Debug|x86
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|x86.Build.0 = Debug|x86
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Debug|x86.Deploy.0 = Debug|x86
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|Any CPU.Build.0 = Release|Any CPU
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|Any CPU.Deploy.0 = Release|Any CPU
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|ARM.ActiveCfg = Release|ARM
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|ARM.Build.0 = Release|ARM
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|ARM.Deploy.0 = Release|ARM
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|x64.ActiveCfg = Release|x64
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|x64.Build.0 = Release|x64
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|x64.Deploy.0 = Release|x64
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|x86.ActiveCfg = Release|x86
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|x86.Build.0 = Release|x86
{2EB6BE9C-103F-4FEE-B353-B58F06CABCF2}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file not shown.
20 changes: 20 additions & 0 deletions Source Code/Chapter 1/GrocerApp/GrocerApp/App.xaml
@@ -0,0 +1,20 @@
<Application
x:Class="GrocerApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:GrocerApp">

<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>

<!--
Styles that define common aspects of the platform look and feel
Required by Visual Studio project and item templates
-->
<ResourceDictionary Source="Common/StandardStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>

</ResourceDictionary>
</Application.Resources>
</Application>
58 changes: 58 additions & 0 deletions Source Code/Chapter 1/GrocerApp/GrocerApp/App.xaml.cs
@@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

namespace GrocerApp {

sealed partial class App : Application {

public App() {
this.InitializeComponent();
this.Suspending += OnSuspending;
}

protected override void OnLaunched(LaunchActivatedEventArgs args) {
Frame rootFrame = Window.Current.Content as Frame;


if (rootFrame == null) {
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();

if (args.PreviousExecutionState == ApplicationExecutionState.Terminated) {
//TODO: Load state from previously suspended application
}

// Place the frame in the current Window
Window.Current.Content = rootFrame;
}

if (rootFrame.Content == null) {

if (!rootFrame.Navigate(typeof(MainPage), args.Arguments)) {
throw new Exception("Failed to create initial page");
}
}
// Ensure the current window is active
Window.Current.Activate();
}

private void OnSuspending(object sender, SuspendingEventArgs e) {
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 70d599c

Please sign in to comment.