Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Apress
committed
Oct 16, 2016
0 parents
commit b9317ba
Showing
246 changed files
with
16,622 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Freeware License, some rights reserved | ||
|
||
Copyright (c) 2012 Ashish Ghoda | ||
|
||
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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#Apress Source Code | ||
|
||
This repository accompanies [*Windows 8 MVVM Patterns Revealed*](http://www.apress.com/9781430249085) by Ashish Ghoda (Apress, 2012). | ||
|
||
![Cover image](9781430249085.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
46
Windows8MVVM_FinalSourceCode/Chapter1/FinanceHub/FinanceHub.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FinanceHub", "FinanceHub\FinanceHub.csproj", "{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|ARM = Debug|ARM | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|ARM = Release|ARM | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|ARM.ActiveCfg = Debug|ARM | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|ARM.Build.0 = Debug|ARM | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|ARM.Deploy.0 = Debug|ARM | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|Any CPU.Deploy.0 = Debug|Any CPU | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|x64.ActiveCfg = Debug|x64 | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|x64.Build.0 = Debug|x64 | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|x64.Deploy.0 = Debug|x64 | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|x86.ActiveCfg = Debug|x86 | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|x86.Build.0 = Debug|x86 | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Debug|x86.Deploy.0 = Debug|x86 | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|ARM.ActiveCfg = Release|ARM | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|ARM.Build.0 = Release|ARM | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|ARM.Deploy.0 = Release|ARM | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|Any CPU.Deploy.0 = Release|Any CPU | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|x64.ActiveCfg = Release|x64 | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|x64.Build.0 = Release|x64 | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|x64.Deploy.0 = Release|x64 | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|x86.ActiveCfg = Release|x86 | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|x86.Build.0 = Release|x86 | ||
{855A87BA-4C7B-45C4-8D64-CC3EE2B50643}.Release|x86.Deploy.0 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Binary file not shown.
20 changes: 20 additions & 0 deletions
20
Windows8MVVM_FinalSourceCode/Chapter1/FinanceHub/FinanceHub/App.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Application | ||
x:Class="FinanceHub.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:FinanceHub"> | ||
|
||
<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> |
83 changes: 83 additions & 0 deletions
83
Windows8MVVM_FinalSourceCode/Chapter1/FinanceHub/FinanceHub/App.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
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; | ||
|
||
// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227 | ||
|
||
namespace FinanceHub | ||
{ | ||
/// <summary> | ||
/// Provides application-specific behavior to supplement the default Application class. | ||
/// </summary> | ||
sealed partial class App : Application | ||
{ | ||
/// <summary> | ||
/// Initializes the singleton application object. This is the first line of authored code | ||
/// executed, and as such is the logical equivalent of main() or WinMain(). | ||
/// </summary> | ||
public App() | ||
{ | ||
this.InitializeComponent(); | ||
this.Suspending += OnSuspending; | ||
} | ||
|
||
/// <summary> | ||
/// Invoked when the application is launched normally by the end user. Other entry points | ||
/// will be used when the application is launched to open a specific file, to display | ||
/// search results, and so forth. | ||
/// </summary> | ||
/// <param name="args">Details about the launch request and process.</param> | ||
protected override void OnLaunched(LaunchActivatedEventArgs args) | ||
{ | ||
// Do not repeat app initialization when already running, just ensure that | ||
// the window is active | ||
if (args.PreviousExecutionState == ApplicationExecutionState.Running) | ||
{ | ||
Window.Current.Activate(); | ||
return; | ||
} | ||
|
||
if (args.PreviousExecutionState == ApplicationExecutionState.Terminated) | ||
{ | ||
//TODO: Load state from previously suspended application | ||
} | ||
|
||
// Create a Frame to act navigation context and navigate to the first page | ||
var rootFrame = new Frame(); | ||
if (!rootFrame.Navigate(typeof(MainPage))) | ||
{ | ||
throw new Exception("Failed to create initial page"); | ||
} | ||
|
||
// Place the frame in the current Window and ensure that it is active | ||
Window.Current.Content = rootFrame; | ||
Window.Current.Activate(); | ||
} | ||
|
||
/// <summary> | ||
/// Invoked when application execution is being suspended. Application state is saved | ||
/// without knowing whether the application will be terminated or resumed with the contents | ||
/// of memory still intact. | ||
/// </summary> | ||
/// <param name="sender">The source of the suspend request.</param> | ||
/// <param name="e">Details about the suspend request.</param> | ||
private void OnSuspending(object sender, SuspendingEventArgs e) | ||
{ | ||
var deferral = e.SuspendingOperation.GetDeferral(); | ||
//TODO: Save application state and stop any background activity | ||
deferral.Complete(); | ||
} | ||
} | ||
} |
Binary file added
BIN
+801 Bytes
Windows8MVVM_FinalSourceCode/Chapter1/FinanceHub/FinanceHub/Assets/Logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+329 Bytes
Windows8MVVM_FinalSourceCode/Chapter1/FinanceHub/FinanceHub/Assets/SmallLogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.1 KB
...ows8MVVM_FinalSourceCode/Chapter1/FinanceHub/FinanceHub/Assets/SplashScreen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+429 Bytes
Windows8MVVM_FinalSourceCode/Chapter1/FinanceHub/FinanceHub/Assets/StoreLogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.