Skip to content

Commit

Permalink
VictorL - Began working on HomePage Views.
Browse files Browse the repository at this point in the history
  • Loading branch information
Blisse committed Jan 11, 2014
1 parent c79aa3e commit 71d10d2
Show file tree
Hide file tree
Showing 94 changed files with 11,665 additions and 54 deletions.
54 changes: 47 additions & 7 deletions UWOpenDataW8/App.xaml
@@ -1,7 +1,47 @@
<Application <Application x:Class="UWOpenDataW8.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UWOpenDataW8"
x:Class="UWOpenDataW8.App" xmlns:vm="using:UWOpenDataW8.ViewModels">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <Application.Resources>
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" <!-- OVERRIDE -->
xmlns:local="using:UWOpenDataW8"> <!-- <SolidColorBrush x:Key="ListViewItemSelectedPointerOverBackgroundThemeBrush"-->

<!-- Color="Transparent" />-->
</Application> <!-- <SolidColorBrush x:Key="ListViewItemSelectedPointerOverBorderThemeBrush"-->
<!-- Color="Transparent" />-->
<!-- <SolidColorBrush x:Key="ListViewItemSelectedBackgroundThemeBrush"-->
<!-- Color="Transparent" />-->
<!-- <SolidColorBrush x:Key="ListViewItemSelectedForegroundThemeBrush"-->
<!-- Color="Red" />-->
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- etc. -->
</ResourceDictionary.MergedDictionaries>
<!-- COMMON -->

<SolidColorBrush x:Key="BackgroundYellow" Color="#FEDA00"></SolidColorBrush>

<SolidColorBrush x:Key="BackgroundPureWhite" Color="#ffffff" />
<SolidColorBrush x:Key="Transparent" Color="#00000000" />
<SolidColorBrush x:Key="VideoPlayerForegroundBrush" Color="#00B9FC" />
<SolidColorBrush x:Key="HeaderPink" Color="#f02471" />
<SolidColorBrush x:Key="HeaderGray" Color="#eeeeee" />
<SolidColorBrush x:Key="HeaderCyan" Color="#00bbe4" />
<SolidColorBrush x:Key="HeaderYellow" Color="#fff200" />
<SolidColorBrush x:Key="TextGray" Color="#a5a5a5" />
<SolidColorBrush x:Key="TextLightGray" Color="#FFD3D3D3" />
<SolidColorBrush x:Key="TextBlack" Color="#1c1c1c" />
<SolidColorBrush x:Key="TextWhite" Color="#f2f2f2" />
<SolidColorBrush x:Key="BackgroundWhite" Color="#f2f2f2" />
<SolidColorBrush x:Key="BackgroundBlack" Color="#1c1c1c" />
<FontFamily x:Key="OpenSansRegularFamily">/Assets/Fonts/OpenSans-Regular.ttf#Open Sans</FontFamily>
<FontFamily x:Key="OpenSansBoldFamily">/Assets/Fonts/OpenSans-Bold.ttf#Open Sans</FontFamily>
<FontFamily x:Key="FontBoldFamily">/Assets/Fonts/HelveticaNeueLTStd-Roman.otf#Helvetica Neue LT Std</FontFamily>

<vm:ViewModelLocator x:Key="ViewModelLocator"/>

<Style x:Key="ContentHeaderStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="{StaticResource OpenSansBoldFamily}"></Setter>
<Setter Property="FontSize" Value="24"></Setter>
<Setter Property="Foreground" Value="{StaticResource TextBlack}"></Setter>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>
10 changes: 9 additions & 1 deletion UWOpenDataW8/App.xaml.cs
Expand Up @@ -16,6 +16,9 @@
using Windows.UI.Xaml.Navigation; using Windows.UI.Xaml.Navigation;


// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227 // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227
using UWOpenDataW8.Pages;
using UWOpenDataW8.ViewModels;
using UWOpenDataWindowsBase.Utilities;


namespace UWOpenDataW8 namespace UWOpenDataW8
{ {
Expand All @@ -33,6 +36,7 @@ public App()
this.InitializeComponent(); this.InitializeComponent();
this.Suspending += OnSuspending; this.Suspending += OnSuspending;
} }
public static ViewModelLocator ViewModelLocator { get; private set; }


/// <summary> /// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points /// Invoked when the application is launched normally by the end user. Other entry points
Expand Down Expand Up @@ -76,7 +80,11 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
// When the navigation stack isn't restored navigate to the first page, // When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation // configuring the new page by passing required information as a navigation
// parameter // parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
// Custom Initialization
ViewModelLocator = Current.Resources["ViewModelLocator"] as ViewModelLocator;

rootFrame.Navigate(typeof(HomePage), e.Arguments);
} }
// Ensure the current window is active // Ensure the current window is active
Window.Current.Activate(); Window.Current.Activate();
Expand Down
Binary file added UWOpenDataW8/Assets/Fonts/OpenSans-Bold.ttf
Binary file not shown.
Binary file added UWOpenDataW8/Assets/Fonts/OpenSans-Regular.ttf
Binary file not shown.
13 changes: 0 additions & 13 deletions UWOpenDataW8/MainPage.xaml

This file was deleted.

86 changes: 86 additions & 0 deletions UWOpenDataW8/Pages/HomePage.xaml
@@ -0,0 +1,86 @@
<Page
x:Class="UWOpenDataW8.Pages.HomePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UWOpenDataW8.Pages"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
DataContext="{Binding HomePage, Source={StaticResource ViewModelLocator}}">

<Grid Background="{StaticResource BackgroundWhite}">

<Grid Name="ResizableGrid" Visibility="Visible">

<Grid.RowDefinitions>
<RowDefinition Height="120" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<Grid Background="{StaticResource BackgroundYellow}">
<TextBlock Text="Water" Foreground="{StaticResource TextWhite}" FontFamily="{StaticResource OpenSansBoldFamily}" FontSize="60"></TextBlock>
</Grid>

<Grid Name="ContentGrid" Grid.Row="1">
<ScrollViewer Name="RegularScrollViewer"
HorizontalScrollMode="Auto"
HorizontalScrollBarVisibility="Auto"
VerticalScrollMode="Disabled"
VerticalScrollBarVisibility="Hidden"
ZoomMode="Disabled">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="80" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<Grid.ColumnDefinitions>
<ColumnDefinition Width="800"/>
<ColumnDefinition Width="800"/>
<ColumnDefinition Width="800"/>
</Grid.ColumnDefinitions>

<Grid Grid.Column="0" Grid.Row="0">
<TextBlock Text="Home" Style="{StaticResource ContentHeaderStyle}"></TextBlock>
</Grid>
<Grid Grid.Column="0" Grid.Row="1">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="100"></RowDefinition>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>

<TextBlock Grid.Row="0" Text="Weather"></TextBlock>
<Grid Grid.Row="1"></Grid>
<Rectangle Grid.Row="2"></Rectangle>
<TextBlock Grid.Row="3" Text="Upcoming"></TextBlock>
<Grid Grid.Row="4"></Grid>
</Grid>
</Grid>

<Grid Grid.Column="1" Grid.Row="0">
<TextBlock Text="Courses" Style="{StaticResource ContentHeaderStyle}"></TextBlock>
</Grid>
<Grid Grid.Column="1" Grid.Row="1">
<Grid Margin="10">

</Grid>
</Grid>

<Grid Grid.Column="2" Grid.Row="0">
<TextBlock Text="Food Services" Style="{StaticResource ContentHeaderStyle}"></TextBlock>
</Grid>
<Grid Grid.Column="2" Grid.Row="1">
<Grid Margin="10">

</Grid>
</Grid>
</Grid>
</ScrollViewer>
</Grid>
</Grid>
</Grid>
</Page>
Expand Up @@ -15,14 +15,14 @@


// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238


namespace UWOpenDataW8 namespace UWOpenDataW8.Pages
{ {
/// <summary> /// <summary>
/// An empty page that can be used on its own or navigated to within a Frame. /// An empty page that can be used on its own or navigated to within a Frame.
/// </summary> /// </summary>
public sealed partial class MainPage : Page public sealed partial class HomePage : Page
{ {
public MainPage() public HomePage()
{ {
this.InitializeComponent(); this.InitializeComponent();
} }
Expand Down
40 changes: 33 additions & 7 deletions UWOpenDataW8/UWOpenDataW8.csproj
Expand Up @@ -101,22 +101,23 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit> <Prefer32Bit>true</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="App.xaml.cs"> <Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon> <DependentUpon>App.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="MainPage.xaml.cs"> <Compile Include="Pages\HomePage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon> <DependentUpon>HomePage.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ViewModels\ViewModelLocator.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<AppxManifest Include="Package.appxmanifest"> <AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</AppxManifest> </AppxManifest>
<Content Include="Assets\Fonts\OpenSans-Regular.ttf" />
<Content Include="Assets\Fonts\OpenSans-Bold.ttf" />
<None Include="packages.config" />
<None Include="UWOpenDataW8_TemporaryKey.pfx" /> <None Include="UWOpenDataW8_TemporaryKey.pfx" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
Expand All @@ -130,15 +131,40 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</ApplicationDefinition> </ApplicationDefinition>
<Page Include="MainPage.xaml"> <Page Include="Pages\HomePage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page> </Page>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\UWOpenDataWindowsBase\UWOpenDataWindowsBase.csproj">
<Project>{d5a2a9d8-3cde-4bea-a52d-bb0217725c7f}</Project>
<Name>UWOpenDataWindowsBase</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="GalaSoft.MvvmLight">
<HintPath>..\..\OpenData\packages\Portable.MvvmLightLibs.4.2.30.1\lib\win81\GalaSoft.MvvmLight.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.Extras">
<HintPath>..\..\OpenData\packages\Portable.MvvmLightLibs.4.2.30.1\lib\win81\GalaSoft.MvvmLight.Extras.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.Platform">
<HintPath>..\..\OpenData\packages\Portable.MvvmLightLibs.4.2.30.1\lib\win81\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Practices.ServiceLocation">
<HintPath>..\..\OpenData\packages\Portable.CommonServiceLocator.1.2.2\lib\portable-net4+sl4+wp7+win8\Microsoft.Practices.ServiceLocation.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0' "> <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0' ">
<VisualStudioVersion>12.0</VisualStudioVersion> <VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<Import Project="..\..\OpenData\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\OpenData\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
<Error Condition="!Exists('..\..\OpenData\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
<Error Condition="Exists('..\..\OpenData\packages\Microsoft.Bcl.Build.1.0.13\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">
Expand Down
63 changes: 63 additions & 0 deletions UWOpenDataW8/ViewModels/ViewModelLocator.cs
@@ -0,0 +1,63 @@
/*
In App.xaml:
<Application.Resources>
<vm:ViewModelLocator xmlns:vm="clr-namespace:UWOpenDataW8"
x:Key="Locator" />
</Application.Resources>
In the View:
DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}"
You can also use Blend to do all this with the tool's support.
See http://www.galasoft.ch/mvvm
*/

using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Ioc;
using Microsoft.Practices.ServiceLocation;
using UWOpenDataWindowsBase.ViewModels;

namespace UWOpenDataW8.ViewModels
{
/// <summary>
/// This class contains static references to all the view models in the
/// application and provides an entry point for the bindings.
/// </summary>
public class ViewModelLocator
{
/// <summary>
/// Initializes a new instance of the ViewModelLocator class.
/// </summary>

public ViewModelLocator()
{
ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);

////if (ViewModelBase.IsInDesignModeStatic)
////{
//// // Create design time view services and models
//// SimpleIoc.Default.Register<IDataService, DesignDataService>();
////}
////else
////{
//// // Create run time view services and models
//// SimpleIoc.Default.Register<IDataService, DataService>();
////}

SimpleIoc.Default.Register<HomePageViewModel>();
}

public HomePageViewModel HomePage
{
get
{
return ServiceLocator.Current.GetInstance<HomePageViewModel>();
}
}

public static void Cleanup()
{
// TODO Clear the ViewModels
}
}
}
Binary file added UWOpenDataW8/bin/Debug/App.xbf
Binary file not shown.
Binary file added UWOpenDataW8/bin/Debug/AppX/App.xbf
Binary file not shown.
42 changes: 42 additions & 0 deletions UWOpenDataW8/bin/Debug/AppX/AppxManifest.xml
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:build="http://schemas.microsoft.com/developer/appx/2012/build" IgnorableNamespaces="build">
<!--
THIS PACKAGE MANIFEST FILE IS GENERATED BY THE BUILD PROCESS.
Changes to this file will be lost when it is regenerated. To correct errors in this file, edit the source .appxmanifest file.
For more information on package manifest files, see http://go.microsoft.com/fwlink/?LinkID=241727
-->
<Identity Name="78641c95-29c1-4584-b543-86faf7310d93" Publisher="CN=Victor" Version="1.0.0.0" ProcessorArchitecture="neutral" />
<Properties>
<DisplayName>UWOpenDataW8</DisplayName>
<PublisherDisplayName>Victor</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.3.0</OSMinVersion>
<OSMaxVersionTested>6.3.0</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="EN-US" />
</Resources>
<Applications>
<Application Id="App" Executable="UWOpenDataW8.exe" EntryPoint="UWOpenDataW8.App">
<m2:VisualElements DisplayName="UWOpenDataW8" Square150x150Logo="Assets\Logo.png" Square30x30Logo="Assets\SmallLogo.png" Description="UWOpenDataW8" ForegroundText="light" BackgroundColor="#464646">
<m2:SplashScreen Image="Assets\SplashScreen.png" />
</m2:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
<build:Metadata>
<build:Item Name="TargetFrameworkMoniker" Value=".NETCore,Version=v4.5.1" />
<build:Item Name="VisualStudio" Version="12.0" />
<build:Item Name="VisualStudioEdition" Value="Microsoft Visual Studio Ultimate 2013" />
<build:Item Name="OperatingSystem" Version="6.3.9600.16384 (winblue_rtm.130821-1623)" />
<build:Item Name="Microsoft.Build.AppxPackage.dll" Version="12.0.21005.1" />
<build:Item Name="Microsoft.Windows.UI.Xaml.Build.Tasks.dll" Version="12.0.21005.1" />
<build:Item Name="MakePri.exe" Version="6.3.9600.16384 (winblue_rtm.130821-1623)" />
</build:Metadata>
</Package>
Binary file not shown.
Binary file not shown.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added UWOpenDataW8/bin/Debug/AppX/Newtonsoft.Json.dll
Binary file not shown.
Binary file added UWOpenDataW8/bin/Debug/AppX/Pages/HomePage.xbf
Binary file not shown.
Binary file added UWOpenDataW8/bin/Debug/AppX/UWOpenDataLib.dll
Binary file not shown.
Binary file added UWOpenDataW8/bin/Debug/AppX/UWOpenDataW8.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added UWOpenDataW8/bin/Debug/AppX/resources.pri
Binary file not shown.

0 comments on commit 71d10d2

Please sign in to comment.