This commit is contained in:
Nikola Metulev 2016-12-06 22:43:59 -08:00
Родитель 8d6b1f51d8
Коммит 525c6fc5b4
85 изменённых файлов: 3488 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,40 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Blend for Visual Studio 14
VisualStudioVersion = 14.0.25110.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Presidents", "Presidents\Presidents.csproj", "{2311E5BA-EC41-4DCB-911F-7CD127217A2B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Debug|ARM.ActiveCfg = Debug|ARM
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Debug|ARM.Build.0 = Debug|ARM
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Debug|ARM.Deploy.0 = Debug|ARM
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Debug|x64.ActiveCfg = Debug|x64
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Debug|x64.Build.0 = Debug|x64
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Debug|x64.Deploy.0 = Debug|x64
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Debug|x86.ActiveCfg = Debug|x86
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Debug|x86.Build.0 = Debug|x86
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Debug|x86.Deploy.0 = Debug|x86
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Release|ARM.ActiveCfg = Release|ARM
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Release|ARM.Build.0 = Release|ARM
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Release|ARM.Deploy.0 = Release|ARM
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Release|x64.ActiveCfg = Release|x64
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Release|x64.Build.0 = Release|x64
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Release|x64.Deploy.0 = Release|x64
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Release|x86.ActiveCfg = Release|x86
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Release|x86.Build.0 = Release|x86
{2311E5BA-EC41-4DCB-911F-7CD127217A2B}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -0,0 +1,61 @@
<Page
x:Class="Presidents.AllPresidentsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Presidents"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" >
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState>
<VisualState.StateTriggers>
<local:IsTenFootTrigger />
</VisualState.StateTriggers>
<VisualState.Setters>
<!-- // TODO: 1.4 Add a template for when IsTenFootTrigger fires -->
<!--<Setter Target="gridView.Template">
<Setter.Value>
<ControlTemplate TargetType="GridView">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<ScrollViewer x:Name="ScrollViewer" AutomationProperties.AccessibilityView="Raw" BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}" HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" IsHorizontalScrollChainingEnabled="{TemplateBinding ScrollViewer.IsHorizontalScrollChainingEnabled}" IsVerticalScrollChainingEnabled="{TemplateBinding ScrollViewer.IsVerticalScrollChainingEnabled}" IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" TabNavigation="{TemplateBinding TabNavigation}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}">
<ItemsPresenter
Margin="0,0,0,27"
FooterTransitions="{TemplateBinding FooterTransitions}" FooterTemplate="{TemplateBinding FooterTemplate}" Footer="{TemplateBinding Footer}" HeaderTemplate="{TemplateBinding HeaderTemplate}" Header="{TemplateBinding Header}" HeaderTransitions="{TemplateBinding HeaderTransitions}" Padding="{TemplateBinding Padding}"/>
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>-->
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<ScrollViewer x:Name="scrollViewer" HorizontalScrollMode="Disabled">
<StackPanel>
<Grid x:Name="Banner" HorizontalAlignment="Left" Height="145">
<StackPanel Orientation="Horizontal">
<Image Source="assets/The_Peacemakers_1868_cropped.jpg" Stretch="Uniform" HorizontalAlignment="Left"/>
<Image Source="assets/george_washington_deleware.jpg" Stretch="Uniform" HorizontalAlignment="Left"/>
<Image Source="assets/emancipation.jpg" Margin="-1,0,0,0" Stretch="Uniform" HorizontalAlignment="Left"/>
<Image Source="assets/declaration_of_independence.jpg" Stretch="Uniform" HorizontalAlignment="Left"/>
<Image Source="assets/signing_constitution.jpg" Stretch="Uniform" HorizontalAlignment="Left"/>
</StackPanel>
<TextBlock Text="Presidents of the United States" FontSize="28" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="20, 0, 0, 10" FontFamily="Segoe UI" FontWeight="SemiLight" Foreground="White" />
</Grid>
<!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,14,48,14">
<Button VerticalAlignment="Center">Filter</Button>
<Slider VerticalAlignment="Center" Width="250" Value="250" Minimum="100" Maximum="400" Header="Size" x:Name="slider" Margin="10,0"/>
<Button VerticalAlignment="Center">Apply</Button>
</StackPanel>-->
<GridView x:Name="gridView" ItemTemplate="{StaticResource ItemPresident}" SelectionMode="None" Margin="10,10,0,0" >
</GridView>
</StackPanel>
</ScrollViewer>
</Grid>
</Page>

Просмотреть файл

@ -0,0 +1,87 @@
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
namespace Presidents
{
public sealed partial class AllPresidentsView : Page
{
public AllPresidentsView()
{
this.InitializeComponent();
gridView.ItemsSource = President.FilteredPresidents;
gridView.ItemClick += Gv_ItemClick;
gridView.KeyDown += Gv_KeyDown;
scrollViewer.KeyDown += ScrollViewer_KeyDown;
// potential demo
gridView.IsItemClickEnabled = true;
gridView.GotFocus += GridView_GotFocus;
}
// keep focusrect away from the edge of the screen
private void GridView_GotFocus(object sender, RoutedEventArgs e)
{
if (App.IsTenFoot)
{
var padding = 47; // pick your favorite number
var item = (FocusManager.GetFocusedElement() as Control);
if (item != null)
{
var itemTop = item.TransformToVisual(scrollViewer).TransformPoint(new Windows.Foundation.Point(0, 0)).Y;
var itemBottom = item.TransformToVisual(scrollViewer).TransformPoint(new Windows.Foundation.Point(item.ActualWidth, item.ActualHeight)).Y;
if (itemTop < padding)
scrollViewer.ChangeView(null, scrollViewer.VerticalOffset + itemTop - padding, null);
else if (itemBottom > scrollViewer.ViewportHeight - padding)
scrollViewer.ChangeView(null, scrollViewer.VerticalOffset + itemBottom - scrollViewer.ViewportHeight + padding, null);
}
}
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (e.Parameter != null && e.Parameter != "")
gridView.ItemsSource = e.Parameter;
}
private void ScrollViewer_KeyDown(object sender, KeyRoutedEventArgs e)
{
if (e.OriginalKey == Windows.System.VirtualKey.GamepadDPadUp
|| e.OriginalKey == Windows.System.VirtualKey.GamepadLeftThumbstickUp)
{
// don't move focus into nav bar
e.Handled = true;
}
else if (e.OriginalKey == Windows.System.VirtualKey.GamepadDPadDown
|| e.OriginalKey == Windows.System.VirtualKey.GamepadLeftThumbstickDown)
{
// don't move focus into nav bar
e.Handled = true;
}
}
private void Gv_KeyDown(object sender, KeyRoutedEventArgs e)
{
if (e.OriginalKey == Windows.System.VirtualKey.GamepadDPadUp
|| e.OriginalKey == Windows.System.VirtualKey.GamepadLeftThumbstickUp)
{
// scroll banner image into view
scrollViewer.ChangeView(0, 0, null, false);
e.Handled = true;
}
}
private void Gv_ItemClick(object sender, ItemClickEventArgs e)
{
this.Frame.Navigate(typeof(DetailsView), e.ClickedItem);
}
}
}

Просмотреть файл

@ -0,0 +1,28 @@
<Application
x:Class="Presidents.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Presidents"
RequestedTheme="Light"
>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:ImageConverter x:Key="ImageConverter"/>
<DataTemplate x:Key="ItemPresident">
<StackPanel Width="135" Margin="10" AutomationProperties.Name="{Binding FullName}">
<Image Height="160" Source="{Binding ImageSource}" Stretch="UniformToFill" AutomationProperties.Name="{Binding AutomationImageName}"/>
<TextBlock Margin="0,4,0,0" FontSize="13" FontFamily="Segoe UI" FontWeight="SemiBold" TextWrapping="Wrap" VerticalAlignment="Bottom" HorizontalAlignment="Left" Text="{Binding FullName}"/>
<TextBlock FontSize="12" FontFamily="Segoe UI" TextWrapping="Wrap" VerticalAlignment="Bottom" HorizontalAlignment="Left" Text="{Binding YearsInParens}"/>
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Application.Resources>
</Application>

Просмотреть файл

@ -0,0 +1,140 @@
using System;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Navigation;
using Windows.UI;
using Windows.UI.ViewManagement;
using Windows.System.Profile;
namespace Presidents
{
sealed partial class App : Application
{
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
// TODO: 3.0 - Change the pointer mode to support selected mode rather than pointer mode
//App.Current.RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
// TODO: 1.2 - Ensure we use ALL of the window space. That means we have to make sure we follow the safe area of the screen!
// ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
// TODO: 5.1 - If we want a ten foot view, we probably want color safe colors as well. This dictionary solves that for default styles.
//if (App.IsTenFoot)
//{
// // use TV colorsafe values
// this.Resources.MergedDictionaries.Add(new ResourceDictionary
// {
// Source = new Uri("ms-appx:///TvSafeColors.xaml")
// });
//}
ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar;
if (titleBar != null)
{
Color titleBarColor = (Color)App.Current.Resources["SystemChromeMediumColor"];
titleBar.BackgroundColor = titleBarColor;
titleBar.ButtonBackgroundColor = titleBarColor;
}
MainPage shell = Window.Current.Content as MainPage;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (shell == null)
{
// Create a AppShell to act as the navigation context and navigate to the first page
shell = new MainPage();
// Set the default language
shell.Language = Windows.Globalization.ApplicationLanguages.Languages[0];
shell.AppFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
// Should load state from previous run
}
}
// Place our app shell in the current Window
Window.Current.Content = shell;
if (shell.AppFrame.Content == null)
{
// When the navigation stack isn't restored, navigate to the first page
// suppressing the initial entrance animation.
shell.AppFrame.Navigate(typeof(AllPresidentsView), e.Arguments, new Windows.UI.Xaml.Media.Animation.SuppressNavigationTransitionInfo());
}
// Ensure the current window is active
Window.Current.Activate();
ApplicationView.GetForCurrentView().SetPreferredMinSize(new Size(320, 200));
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <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();
// Save application state and stop any background activity
deferral.Complete();
}
// TODO: 1.0 - Helper function to set the app into Ten foot mode.
// TODO: 4.1 - See styles.xaml for how to configure the nav menu to look more like an XBOX and use safe areas
/// <summary>
/// This function is used to configure the app to run in 10 foot mode, even while running on a PC.
/// If you connect your machine to a large TV and want the same XBOX type experience in the app, this
/// is one way to achieve this.
/// </summary>
public static bool IsTenFootPC { get; private set; } = IsTenFoot;
public static bool IsTenFoot
{
get
{
return AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Xbox" || IsTenFootPC;
}
set
{
if (value != IsTenFootPC)
{
IsTenFootPC = value;
TenFootModeChanged?.Invoke(null, null);
}
}
}
public static event EventHandler TenFootModeChanged;
}
}

Двоичные данные
event_demos/presidents/Presidents/Assets/1024px-James_Madison.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 90 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/165px-James_Madison.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 10 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/44_Bill_Clinton_3x4.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 171 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/Abraham_Lincoln.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 13 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.8 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/Andrew_Johnson.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 13 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.3 KiB

Просмотреть файл

@ -0,0 +1,134 @@
new President()
{
FirstName="James K.",
LastName="Polk",
NickName="Young Hickory",
PresidentNumber="11th president",
YearsInOffice="1845-1849 (1 term)",
Party="Democrat",
State="Tennessee",
VP="George M. Dallas",
Summary="James Knox Polk was the only president to have served as house speaker, and fulfilled all of his policies set during his campaign.
He lead the sweeping victory in the Mexican-American war, seizing what is now the American Southwest.",
Image=new Uri("ms-appx:///Assets/JamesKPolk.jpg"),
},
new President()
{
FirstName="Zachary",
LastName="Taylor",
NickName="Old Rough and Ready",
PresidentNumber="12th president",
YearsInOffice="1849-1850 (<1 term)",
Party="Whig",
State="Tennessee",
VP="Millard Fillmore",
Summary="Zachary Taylor won the presidency despite his lack of interest in politics, it's believed that his status as a national war hero in the Mexican-American war won him his election.
He died 17 months into his election, due to an "unknown digestive ailment".",
Image=new Uri("ms-appx:///Assets/Zachary_Taylor.png"),
},
new President()
{
FirstName="Millard",
LastName="Fillmore",
NickName="None",
PresidentNumber="13th president",
YearsInOffice="1850-1853 (1 term)",
Party="Whig",
State="New York",
VP="None",
Summary="Millard Fillmore was the last "Whig" president, meaning he was not associated with either the Republican or Democrat party.
When the Whig party broke up in 1854-1856 (after his term), Millard refused to join any party.",
Image=new Uri("ms-appx:///Assets/Millard_Fillmore_by_Brady_Studio.jpg"),
},
new President()
{
FirstName="Franklin",
LastName="Pierce",
NickName="None",
PresidentNumber="14th president",
YearsInOffice="1853-1857 (1 term)",
Party="Democrat",
State="New Hampshire",
VP="William R. King (1853), None (1853-1857)",
Summary="Franklin Pierce disliked the abolitionist movement (the movement to end slavery in America) and in signing the Kansas-Nebraska Act set the stage for the
attempted Southern secession. He was seen as a "compromise" candidate by the Democrats, and was not elected for a second term.",
Image=new Uri("ms-appx:///Assets/Franklin_Pierce_MathewBrady.jpg"),
},
new President()
{
FirstName="James",
LastName="Buchanan",
NickName="Doughface",
PresidentNumber="15th president",
YearsInOffice="1857-1861 (1 term)",
Party="Democrat",
State="Pennsylvania",
VP="John C. Breckinridge",
Summary="James Buchanan Jr. served as president immediately before the Civil War. It is believed that his efforts to maintain peace between the North and South resulted
in only alienating both sides even more. He desired to be ranked in history among George Washington were unfulfilled due to his inability to find peace between the North and South.",
Image=new Uri("ms-appx:///Assets/James_Buchanan.jpg"),
},
new President()
{
FirstName="Abraham",
LastName="Lincoln",
NickName="Honest Abe",
PresidentNumber="16th president",
YearsInOffice="1861-1865 (1 term)",
Party="Republican",
State="Illinois",
VP="Hannibal Hamlin (1861-1865), Andrew Johnson (1865)",
Summary="Abraham Lincoln served only 1 term before his infamous assassination on April, 1865. He led the country through the Civil War and managed to preserve the Union and abolish slavery during that time.
He was mainly self-educated and was originally a member of the Whig party, before becoming Republican in 1854.",
Image=new Uri("ms-appx:///Assets/Abraham_Lincoln.jpg"),
},
new President()
{
FirstName="Andrew",
LastName="Johnson",
NickName="None",
PresidentNumber="17th president",
YearsInOffice="1865-1869 (1 term)",
Party="Democrat",
State="Tennessee",
VP="None",
Summary="Andrew Johnson became president through the face that he was vice president at the time of Abraham Lincoln's assassination.
He came into conflict with the largely Republican dominated Congress, and was the first president to be impeached after 1 term.",
Image=new Uri("ms-appx:///Assets/Andrew_Johnson.jpg"),
},
new President()
{
FirstName="Ulysses S.",
LastName="Grant",
NickName="Sam",
PresidentNumber="18th president",
YearsInOffice="1869-1877 (2 term)",
Party="Republican",
State="Ohio",
VP="Schuyler Colfax (1869-1873), Henry Wilson (1873-1875), None (1875-1877)",
Summary="Ulysses S. Grant worked closly with former president Abraham Lincoln during the Civil War to help him lead the Union Army to victory over the Confederacy.
He struggled financially in civilian life and has been criticized for corruption and leading the nation into a severe economic depression during his second term.",
Image=new Uri("ms-appx:///Assets/Ulysses_Grant.jpg"),
},
new President()
{
FirstName="Rutherford B.",
LastName="Hayes",
NickName="None",
PresidentNumber="19th president",
YearsInOffice="1877-1881 (1 term)",
Party="Republican",
State="Ohio",
VP="William Wheeler",
Summary="Rutherford B. Hayes had strong beliefs in meritocratic government, equal treatment without regard to race, and improvement through education. During his presidency
he oversaw the end of the Reconstruction (started by Ulysses Grant), and began to lead the nation to civil service reform. He was also left (and attempted) to reconcile the divisions left over from the Civil War.",
Image=new Uri("ms-appx:///Assets/Rutherford_Hayes_MathewBrady.jpg"),
},

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 30 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/Franklin_D__Roosevelt.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/George-W-Bush.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 158 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 124 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 180 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 601 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/Harry_S__Truman.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 32 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/JQA_Photo_tif.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 33 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/JamesKPolk.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 41 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/James_Buchanan.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.0 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 208 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 405 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/John_F__Kennedy.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 210 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 42 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 110 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 127 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 162 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 124 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 139 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/President_Eisenhower.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 36 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 26 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 32 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 213 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.8 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.5 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.9 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/StoreLogo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 46 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.2 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/Ulysses_Grant.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.4 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/WashingtonCropped.JPG Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 91 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.8 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/Zachary_Taylor.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 115 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/arthur21.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 125 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/emancipation.JPG Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 47 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/garfield20.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 58 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/grover22.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 39 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/grover24.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 14 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/harrison23.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 14 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/mckinley25.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 16 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/roosevelt26.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 14 KiB

Двоичные данные
event_demos/presidents/Presidents/Assets/signing_constitution.JPG Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 54 KiB

Просмотреть файл

@ -0,0 +1,32 @@
<Page
x:Class="Presidents.CompareView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Presidents"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" x:Name="mainGrid">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState>
<VisualState.StateTriggers>
<local:IsTenFootTrigger />
</VisualState.StateTriggers>
<VisualState.Setters>
<!-- demo 5: account for overscan -->
<Setter Target="mainGrid.Margin" Value="0,27,48,27"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<GridView x:Name="gv" ItemTemplate="{StaticResource ItemPresident}" Grid.Row="0" IsFocusEngagementEnabled="True"/>
<Button Content="Done" Grid.Row="1" HorizontalAlignment="Center"/>
</Grid>
</Page>

Просмотреть файл

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
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;
// TODO: 4.0 - Note that we set the focus engagement manually to ensure we capture the input see the XAML file: IsFocusEngagementEnabled="True"
namespace Presidents
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class CompareView : Page
{
public CompareView()
{
this.InitializeComponent();
gv.ItemsSource = President.AllPresidents;
gv.SelectionMode = ListViewSelectionMode.Multiple;
//gv.IsFocusEngagementEnabled = true;
}
}
}

Просмотреть файл

@ -0,0 +1,66 @@
<Page
x:Class="Presidents.DetailsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Presidents"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
>
<!--Width="960" Height="540"
Width="864" Height="486"
-->
<Border Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" x:Name="mainBorder" >
<Grid Margin="24" x:Name="mainGrid">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Vertical" >
<TextBlock x:Name="textBlock" FontSize="28" TextWrapping="Wrap" Text="{Binding FullName}" Style="{StaticResource HeaderTextBlockStyle}" Margin="0" d:LayoutOverrides="Width" HorizontalAlignment="Left"/>
<TextBlock x:Name="textBlock5" FontSize="20" TextWrapping="Wrap" Text="{Binding NickName}" Style="{StaticResource SubheaderTextBlockStyle}" />
<TextBlock x:Name="textBlock2" TextWrapping="Wrap" Margin="0,20,0,0" FontSize="12" HorizontalAlignment="Left">
<Run Text="{Binding PresidentNumber}"/>
<Run Text=", "/>
<Run Text="{Binding YearsInOffice}"/>
</TextBlock>
<TextBlock x:Name="textBlock3" HorizontalAlignment="Left" TextWrapping="Wrap" FontSize="12" >
<Run Text="{Binding Party}"/>
<Run Text=", "/>
<Run Text="{Binding State}"/>
</TextBlock>
<TextBlock x:Name="textBlock4" HorizontalAlignment="Left" TextWrapping="Wrap" FontSize="12" >
<Run Text="VP: "/>
<Run Text="{Binding VP}"/>
</TextBlock>
<TextBlock x:Name="textBlock1" HorizontalAlignment="Left" TextWrapping="Wrap" FontSize="12" Margin="0,20,0,0"
Text="{Binding Summary}"/>
</StackPanel>
<ContentControl x:Name="inkCanvasHolder" TabIndex="2" IsFocusEngagementEnabled="True" RequiresPointer="WhenEngaged" Grid.Column="1" Grid.RowSpan="2" Margin="24, 0, 0, 0" UseSystemFocusVisuals="True" >
<Grid>
<Image Source="{Binding ImageSource}" Stretch="Uniform" VerticalAlignment="Center"
AutomationProperties.Name="{Binding AutomationImageName}"/>
<InkCanvas x:Name="inkCanvas"/>
</Grid>
</ContentControl>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<Button x:Name="previousButton" TabIndex="0" Content="Previous" Width="90" Click="previousButton_Click" />
<Button x:Name="nextButton" TabIndex="1" Content="Next" Width="90" Margin="4,0,0,0" Click="nextButton_Click" />
</StackPanel>
</Grid>
</Border>
</Page>

Просмотреть файл

@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
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 Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
namespace Presidents
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class DetailsView : Page
{
public DetailsView()
{
this.InitializeComponent();
this.inkCanvas.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Mouse | Windows.UI.Core.CoreInputDeviceTypes.Pen | Windows.UI.Core.CoreInputDeviceTypes.Touch;
var attr = new Windows.UI.Input.Inking.InkDrawingAttributes();
attr.Size = new Size(5, 5);
this.inkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(attr);
this.Loaded += DetailsView_Loaded;
this.KeyDown += DetailsView_KeyDown;
}
private void DetailsView_KeyDown(object sender, KeyRoutedEventArgs e)
{
if (e.OriginalKey == Windows.System.VirtualKey.GamepadLeftShoulder)
{
GotoAnother(-1);
e.Handled = true;
} else if (e.OriginalKey == Windows.System.VirtualKey.GamepadRightShoulder)
{
GotoAnother(1);
e.Handled = true;
}
}
private void DetailsView_Loaded(object sender, RoutedEventArgs e)
{
if (App.IsTenFoot)
mainBorder.Padding = new Thickness(0,27,48,27);
inkCanvasHolder.XYFocusLeft = nextButton;
if (PresIndex() == 0)
previousButton.IsEnabled = false;
if (PresIndex() >= President.FilteredPresidents.Count)
{
nextButton.IsEnabled = false;
inkCanvasHolder.XYFocusLeft = previousButton;
previousButton.Focus(FocusState.Programmatic);
}
else
{
nextButton.Focus(FocusState.Programmatic);
}
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
this.DataContext = e.Parameter;
}
private void nextButton_Click(object sender, RoutedEventArgs e)
{
GotoAnother(1);
}
private int PresIndex()
{
return President.FilteredPresidents.IndexOf(this.DataContext as President);
}
private void GotoAnother(int increment)
{
int index = PresIndex();
index += increment;
if (index < 0) index = 0;
if (index >= President.FilteredPresidents.Count) index = President.FilteredPresidents.Count;
this.Frame.Navigate(typeof(DetailsView), President.FilteredPresidents[index]);
}
private void previousButton_Click(object sender, RoutedEventArgs e)
{
GotoAnother(-1);
}
}
}

Просмотреть файл

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media.Imaging;
namespace Presidents
{
public sealed class ImageConverter : IValueConverter
{
public ImageConverter() { }
public object Convert(object value, Type targetType,
object parameter, string culture)
{
if (value is string)
return new BitmapImage(new Uri((string)value));
else if (value is Uri)
{
return new BitmapImage((Uri)value);
}
else
return null;
}
public object ConvertBack(object value, Type targetType,
object parameter, string culture)
{
throw new NotImplementedException();
}
}
}

Просмотреть файл

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.System.Profile;
using Windows.UI.Xaml;
namespace Presidents
{
// TODO: 1.3 - See MainPage.xaml for Ten Foot View Changes
// TODO: 1.4 - See the XAML for adding a template for when IsTenFootTrigger fires
public class IsTenFootTrigger : StateTriggerBase
{
public IsTenFootTrigger()
{
SetActive(App.IsTenFoot);
App.TenFootModeChanged += App_TenFootModeChanged;
}
private void App_TenFootModeChanged(object sender, EventArgs e)
{
SetActive(App.IsTenFoot);
}
}
}

Просмотреть файл

@ -0,0 +1,185 @@
<Page
x:Class="Presidents.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Presidents"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Loaded="MainPage_Loaded"
>
<Page.Resources>
<DataTemplate x:Key="NavMenuItemTemplate" x:DataType="local:NavMenuItem">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="48" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<!-- Showing a ToolTip and the Label is redundant. We put the ToolTip on the icon.
It appears when the user hovers over the icon, but not the label which provides
value when the SplitView is 'Compact' while reducing the likelihood of showing
redundant information when the label is shown.-->
<FontIcon x:Name="Glyph" FontSize="16" Glyph="{x:Bind SymbolAsChar}" VerticalAlignment="Center" HorizontalAlignment="Center" ToolTipService.ToolTip="{x:Bind Label}"/>
<TextBlock x:Name="Text" Grid.Column="1" Text="{x:Bind Label}" Style="{StaticResource BodyTextBlockStyle}" TextWrapping="NoWrap"/>
</Grid>
</DataTemplate>
</Page.Resources>
<Border Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" x:Name="LayoutRoot">
<!-- Adaptive triggers -->
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState>
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="{StaticResource LargeWindowSnapPoint}" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="splitView.DisplayMode" Value="CompactInline"/>
<Setter Target="splitView.IsPaneOpen" Value="True"/>
<Setter Target="NavPaneDivider.Visibility" Value="Visible"/>
</VisualState.Setters>
</VisualState>
<VisualState>
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="{StaticResource MediumWindowSnapPoint}" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="splitView.DisplayMode" Value="CompactOverlay"/>
<Setter Target="splitView.IsPaneOpen" Value="False"/>
<Setter Target="NavPaneDivider.Visibility" Value="Collapsed"/>
</VisualState.Setters>
</VisualState>
<VisualState>
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="{StaticResource MinWindowSnapPoint}" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="splitView.DisplayMode" Value="Overlay"/>
<Setter Target="splitView.IsPaneOpen" Value="False"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
<!-- // TODO: 1.3 - Ten Foot View Changes -->
<VisualStateGroup>
<VisualState>
<VisualState.StateTriggers>
<local:IsTenFootTrigger />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="splitView.DisplayMode" Value="CompactInline"/>
<Setter Target="splitView.IsPaneOpen" Value="False"/>
<Setter Target="NavPaneDivider.Visibility" Value="Collapsed"/>
<Setter Target="splitView.CompactPaneLength" Value="96"/>
<Setter Target="splitView.OpenPaneLength" Value="266"/>
<Setter Target="NavMenuList.ItemContainerStyle" Value="{StaticResource NavMenuItemContainerXboxStyle}"/>
<Setter Target="FeedbackButton.Style" Value="{StaticResource SplitViewPaneButtonXboxStyle}"/>
<Setter Target="SettingsButton.Style" Value="{StaticResource SplitViewPaneButtonXboxStyle}"/>
<Setter Target="TenFootModeToggle.Style" Value="{StaticResource SplitViewPaneButtonXboxStyle}"/>
<Setter Target="TogglePaneButton.Style" Value="{StaticResource SplitViewTogglePaneButtonXboxStyle}"/>
<Setter Target="TogglePaneButton.Margin" Value="48, 27, 0, 0"/>
<Setter Target="TogglePaneButton.IsChecked" Value="false"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid x:Name="childOfRoot">
<Grid x:Name="rootGrid" >
<!-- Top-level navigation menu + app content -->
<SplitView x:Name="splitView"
DisplayMode="Inline"
OpenPaneLength="320"
IsTabStop="False"
PaneClosed="SplitView_PaneClosed">
<SplitView.Pane>
<Grid x:Name="splitViewContents">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ToggleButton x:Name="TogglePaneButton"
Grid.Row="0"
Style="{StaticResource SplitViewTogglePaneButtonStyle}"
IsChecked="{Binding IsPaneOpen, ElementName=splitView, Mode=TwoWay}"
Checked="TogglePaneButton_Checked"
AutomationProperties.Name="Menu"
ToolTipService.ToolTip="Menu" />
<!-- A custom ListView to display the items in the pane. The automation Name is set in the ContainerContentChanging event. -->
<local:NavMenuListView x:Name="NavMenuList"
Grid.Row="1"
ContainerContentChanging="NavMenuItemContainerContentChanging"
ItemContainerStyle="{StaticResource NavMenuItemContainerStyle}"
ItemTemplate="{StaticResource NavMenuItemTemplate}"
ItemInvoked="NavMenuList_ItemInvoked">
<local:NavMenuListView.Footer>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="48"/>
<ColumnDefinition Width="48"/>
</Grid.ColumnDefinitions>
<Rectangle x:Name="NavPaneDivider"
Grid.ColumnSpan="4"
Height="1"
HorizontalAlignment="Right"
Fill="{StaticResource SystemControlForegroundBaseLowBrush}"
Width="288"
Margin="16,6"/>
<Button x:Name="TenFootModeToggle"
Grid.Row="1"
Grid.Column="1"
Width="48"
Style="{StaticResource SplitViewPaneButtonStyle}"
Content="&#xE740;"
AutomationProperties.Name="Settings"
ToolTipService.ToolTip="10 Foot Mode"
Click="TenFootModeToggle_Click"/>
<Button x:Name="FeedbackButton"
Grid.Row="1"
Grid.Column="2"
Style="{StaticResource SplitViewPaneButtonStyle}"
Content="&#xE76E;"
AutomationProperties.Name="Feedback"
ToolTipService.ToolTip="Feedback"/>
<Button x:Name="SettingsButton"
Grid.Row="1"
Grid.Column="3"
Style="{StaticResource SplitViewPaneButtonStyle}"
Content="&#xE713;"
AutomationProperties.Name="Settings"
ToolTipService.ToolTip="Settings"/>
</Grid>
</local:NavMenuListView.Footer>
</local:NavMenuListView>
</Grid>
</SplitView.Pane>
<!-- OnNavigatingToPage we synchronize the selected item in the nav menu with the current page.
OnNavigatedToPage we move keyboard focus to the first item on the page after it's loaded. -->
<Frame x:Name="Frame"
Navigating="OnNavigatingToPage"
Navigated="OnNavigatedToPage">
<Frame.ContentTransitions>
<TransitionCollection>
<NavigationThemeTransition>
<NavigationThemeTransition.DefaultNavigationTransitionInfo>
<EntranceNavigationTransitionInfo/>
</NavigationThemeTransition.DefaultNavigationTransitionInfo>
</NavigationThemeTransition>
</TransitionCollection>
</Frame.ContentTransitions>
</Frame>
</SplitView>
</Grid>
</Grid>
</Border>
</Page>

Просмотреть файл

@ -0,0 +1,347 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Windows.UI.Xaml.Automation;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.UI.ViewManagement;
using Windows.System;
using Windows.UI;
using Windows.UI.Xaml.Shapes;
using Windows.System.Profile;
namespace Presidents
{
public sealed partial class MainPage : Page
{
#region Fields
CoreCursor _defaultCursor;
private Border visibleBounds;
public static MainPage Current = null;
public Frame AppFrame { get { return this.Frame; } }
// Declare the top level nav items
private List<NavMenuItem> navlist = new List<NavMenuItem>(
new[]
{
new NavMenuItem()
{
Symbol = (Symbol) 0xec08, // courthouse
Label = "All Presidents",
DestPage = typeof(AllPresidentsView)
},
new NavMenuItem()
{
Symbol = Symbol.Favorite,
Label = "Democrats",
DestPage = typeof(AllPresidentsView),
Arguments = President.AllPresidents.Where(p => p.Party.StartsWith("Democrat")),
},
new NavMenuItem()
{
Symbol = (Symbol) 0xe734,
Label = "Republicans",
DestPage = typeof(AllPresidentsView),
Arguments = President.AllPresidents.Where(p => p.Party.StartsWith("Republican")),
},
new NavMenuItem()
{
Symbol = Symbol.Camera,
Label = "Photos",
DestPage = typeof(CompareView)
},
});
#endregion
/// <summary>
/// Initializes a new instance of the AppShell, sets the static 'Current' reference,
/// adds callbacks for Back requests and changes in the SplitView's DisplayMode, and
/// provide the nav menu list with the data to display.
public MainPage()
{
this.InitializeComponent();
SystemNavigationManager.GetForCurrentView().BackRequested += SystemNavigationManager_BackRequested;
SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
NavMenuList.ItemsSource = navlist;
this.KeyDown += MainPage_KeyDown;
_defaultCursor = CoreWindow.GetForCurrentThread().PointerCursor;
UpdateTenFootMode();
if (App.IsTenFoot) // Make sure the side panel is closed when in ten foot mode
{
SplitView_PaneClosed(null, null);
}
// Debugging helper!
// NOTE: You don't really need this anymore with Visual Studio 2015 Update 3
// TODO: 3.2 - Debugging Visual State selection can be hard
//this.GotFocus += (object sender, RoutedEventArgs e) =>
//{
// FrameworkElement focus = FocusManager.GetFocusedElement() as FrameworkElement;
// if (focus != null)
// Debug.WriteLine("got focus: " + focus.Name + " (" + focus.GetType().ToString() + ")");
//};
}
private void SplitView_PaneClosed(SplitView sender, object args)
{
NavPaneDivider.Visibility = Visibility.Collapsed;
// TODO: 3.3 - Cleanup these controls so they are not visible in the visual tree and won't become tab stops
//SettingsButton.Visibility = Visibility.Collapsed;
//TenFootModeToggle.Visibility = Visibility.Collapsed;
//FeedbackButton.Visibility = Visibility.Collapsed;
}
private void TogglePaneButton_Checked(object sender, RoutedEventArgs e)
{
NavPaneDivider.Visibility = Visibility.Visible;
// TODO: 3.3 - Make sure they are added back so the controls DO work when the pane is expanded
//SettingsButton.Visibility = Visibility.Visible;
//TenFootModeToggle.Visibility = Visibility.Visible;
//FeedbackButton.Visibility = Visibility.Visible;
}
private void MainPage_Loaded(object sender, RoutedEventArgs e)
{
this.KeyDown += MainPage_KeyDown;
Current = this;
this.NavMenuList.SelectedIndex = 0;
// Check if we are on XBOX, hide the 10 Foot Mode button (can only run full screen so we don't need this button)
if (AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Xbox")
TenFootModeToggle.Visibility = Visibility.Collapsed;
}
private void MainPage_KeyDown(object sender, KeyRoutedEventArgs e)
{
// TODO: 3.1 - Check for the gamepad, did the user hit the view button?
//if (e.OriginalKey == VirtualKey.GamepadView)
//{
// TogglePaneButton.IsChecked = !(bool)(TogglePaneButton.IsChecked);
// TogglePaneButton.Focus(FocusState.Keyboard);
// if (App.IsTenFoot)
// ElementSoundPlayer.Play(ElementSoundKind.Invoke);
// e.Handled = true;
//}
// TODO: Nice trick to show the BOUNDS of the screen to ensure your controls fit on the screen
if (e.OriginalKey == VirtualKey.GamepadX || e.OriginalKey == VirtualKey.F1)
{
ToggleMonitorBoundsLines();
e.Handled = true;
}
}
private void ToggleMonitorBoundsLines()
{
if (visibleBounds == null)
{
visibleBounds = new Border()
{
BorderBrush = new SolidColorBrush(Color.FromArgb(100, 235, 0, 0)),
IsHitTestVisible = false,
BorderThickness = new Thickness(48, 27, 48, 27),
Visibility = Visibility.Collapsed
};
childOfRoot.Children.Add(visibleBounds);
}
visibleBounds.Visibility = visibleBounds.Visibility == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed;
}
public void OpenNavePane()
{
TogglePaneButton.IsChecked = true; // calls TogglePaneButton_Checked
NavPaneDivider.Visibility = Visibility.Visible;
}
private void SystemNavigationManager_BackRequested(object sender, BackRequestedEventArgs e)
{
if (!e.Handled)
{
e.Handled = this.BackRequested();
}
}
// returns handled
private bool BackRequested()
{
// Get a hold of the current frame so that we can inspect the app back stack.
if (this.AppFrame == null)
return false;
// Check to see if this is the top-most page on the app back stack.
if (this.AppFrame.CanGoBack)
{
// If not, set the event to handled and go back to the previous page in the app.
this.AppFrame.GoBack();
return true;
}
return false;
}
/// <summary>
/// Navigate to the Page for the selected <paramref name="listViewItem"/>.
/// </summary>
/// <param name="sender"></param>
/// <param name="listViewItem"></param>
private void NavMenuList_ItemInvoked(object sender, ListViewItem listViewItem)
{
var item = (NavMenuItem)((NavMenuListView)sender).ItemFromContainer(listViewItem);
if (item != null)
{
if (item.DestPage != null)
//&& item.DestPage != this.AppFrame.CurrentSourcePageType
{
this.AppFrame.Navigate(item.DestPage, item.Arguments);
}
}
}
/// <summary>
/// Ensures the nav menu reflects reality when navigation is triggered outside of
/// the nav menu buttons.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnNavigatingToPage(object sender, NavigatingCancelEventArgs e)
{
if (e.NavigationMode == NavigationMode.Back)
{
var item = (from p in this.navlist where p.DestPage == e.SourcePageType select p).FirstOrDefault();
if (item == null && this.AppFrame.BackStackDepth > 0)
{
// In cases where a page drills into sub-pages then we'll highlight the most recent
// navigation menu item that appears in the BackStack
foreach (var entry in this.AppFrame.BackStack.Reverse())
{
item = (from p in this.navlist where p.DestPage == entry.SourcePageType select p).FirstOrDefault();
if (item != null)
break;
}
}
var container = (ListViewItem)NavMenuList.ContainerFromItem(item);
// While updating the selection state of the item prevent it from taking keyboard focus. If a
// user is invoking the back button via the keyboard causing the selected nav menu item to change
// then focus will remain on the back button.
if (container != null) container.IsTabStop = false;
NavMenuList.SetSelectedItem(container);
if (container != null) container.IsTabStop = true;
}
}
private void OnNavigatedToPage(object sender, NavigationEventArgs e)
{
// After a successful navigation set keyboard focus to the loaded page
if (e.Content is Page && e.Content != null)
{
var control = (Page)e.Content;
control.Loaded += Page_Loaded;
}
}
private void Page_Loaded(object sender, RoutedEventArgs e)
{
((Page)sender).Focus(FocusState.Programmatic);
((Page)sender).Loaded -= Page_Loaded;
}
/// <summary>
/// Enable accessibility on each nav menu item by setting the AutomationProperties.Name on each container
/// using the associated Label of each item.
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
private void NavMenuItemContainerContentChanging(ListViewBase sender, ContainerContentChangingEventArgs args)
{
if (!args.InRecycleQueue && args.Item != null && args.Item is NavMenuItem)
{
args.ItemContainer.SetValue(AutomationProperties.NameProperty, ((NavMenuItem)args.Item).Label);
}
else
{
args.ItemContainer.ClearValue(AutomationProperties.NameProperty);
}
}
private void TenFootModeToggle_Click(object sender, RoutedEventArgs e)
{
App.IsTenFoot = !App.IsTenFoot;
UpdateTenFootMode();
}
private void UpdateTenFootMode()
{
if (App.IsTenFootPC)
{
// Not having any mouse might be an option for your application
//CoreWindow.GetForCurrentThread().PointerCursor = null;
// TODO: 1.1 - If the app is running in Ten Foot mode, lets make sure we are full screen on a desktop / tablet
// ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
if (!(LayoutRoot.Child is Viewbox))
{
Viewbox viewbox = new Viewbox();
LayoutRoot.Child = viewbox;
viewbox.Child = childOfRoot;
childOfRoot.Height = 540;
childOfRoot.Width = 960;
}
// TODO: 5.0 - We can set the theme here to Dark when in Ten Foot Mode
// this.RequestedTheme = ElementTheme.Dark;
// TODO: 5.2 - Make the xbox sounds even when on PC because in Ten Foot mode we want that experience.
//ElementSoundPlayer.State = ElementSoundPlayerState.On;
}
else
{
// We are not an XBOX, or have not set TenFootMode override
CoreWindow.GetForCurrentThread().PointerCursor = _defaultCursor;
// Full screen is not the normal mode on a non XBOX machine
ApplicationView.GetForCurrentView().ExitFullScreenMode();
if (LayoutRoot.Child is Viewbox)
{
(LayoutRoot.Child as Viewbox).Child = null;
LayoutRoot.Child = childOfRoot;
childOfRoot.Height = double.NaN;
childOfRoot.Width = double.NaN;
}
// Use the default Theme on the PC
this.RequestedTheme = ElementTheme.Default;
// Use the sound defaults on the PC
ElementSoundPlayer.State = ElementSoundPlayerState.Auto;
}
}
}
}

Просмотреть файл

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace Presidents
{
/// <summary>
/// Data to represent an item in the nav menu.
/// </summary>
public class NavMenuItem
{
public string Label { get; set; }
public Symbol Symbol { get; set; }
public char SymbolAsChar
{
get
{
return (char)this.Symbol;
}
}
public Type DestPage { get; set; }
public object Arguments { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,239 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.System;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Animation;
namespace Presidents
{
/// <summary>
/// A specialized ListView to represent the items in the navigation menu.
/// </summary>
/// <remarks>
/// This class handles the following:
/// 1. Sizes the panel that hosts the items so they fit in the hosting pane. Otherwise, the keyboard
/// may appear cut off on one side b/c the Pane clips instead of affecting layout.
/// 2. Provides a single selection experience where keyboard focus can move without changing selection.
/// Both the 'Space' and 'Enter' keys will trigger selection. The up/down arrow keys can move
/// keyboard focus without triggering selection. This is different than the default behavior when
/// SelectionMode == Single. The default behavior for a ListView in single selection requires using
/// the Ctrl + arrow key to move keyboard focus without triggering selection. Users won't expect
/// this type of keyboarding model on the nav menu.
/// </remarks>
public class NavMenuListView : ListView
{
private SplitView splitViewHost;
public NavMenuListView()
{
this.SelectionMode = ListViewSelectionMode.Single;
this.IsItemClickEnabled = true;
this.ItemClick += ItemClickedHandler;
// Locate the hosting SplitView control
this.Loaded += (s, a) =>
{
var parent = VisualTreeHelper.GetParent(this);
while (parent != null && !(parent is SplitView))
{
parent = VisualTreeHelper.GetParent(parent);
}
if (parent != null)
{
this.splitViewHost = parent as SplitView;
splitViewHost.RegisterPropertyChangedCallback(SplitView.IsPaneOpenProperty, (sender, args) =>
{
this.OnPaneToggled();
});
// Call once to ensure we're in the correct state
this.OnPaneToggled();
}
};
}
protected override void OnApplyTemplate()
{
base.OnApplyTemplate();
// Remove the entrance animation on the item containers.
for (int i = 0; i < this.ItemContainerTransitions.Count; i++)
{
if (this.ItemContainerTransitions[i] is EntranceThemeTransition)
{
this.ItemContainerTransitions.RemoveAt(i);
}
}
}
/// <summary>
/// Mark the <paramref name="item"/> as selected and ensures everything else is not.
/// If the <paramref name="item"/> is null then everything is unselected.
/// </summary>
/// <param name="item"></param>
public void SetSelectedItem(ListViewItem item)
{
int index = -1;
if (item != null)
{
index = this.IndexFromContainer(item);
}
for (int i = 0; i < this.Items.Count; i++)
{
var lvi = (ListViewItem)this.ContainerFromIndex(i);
if (lvi != null)
{
if (i != index)
{
lvi.IsSelected = false;
}
else if (i == index)
{
lvi.IsSelected = true;
}
}
}
}
/// <summary>
/// Occurs when an item has been selected
/// </summary>
public event EventHandler<ListViewItem> ItemInvoked;
/// <summary>
/// Custom keyboarding logic to enable movement via the arrow keys without triggering selection
/// until a 'Space' or 'Enter' key is pressed.
/// </summary>
/// <param name="e"></param>
protected override void OnKeyDown(KeyRoutedEventArgs e)
{
var focusedItem = FocusManager.GetFocusedElement();
switch (e.Key)
{
case VirtualKey.Tab:
var shiftKeyState = CoreWindow.GetForCurrentThread().GetKeyState(VirtualKey.Shift);
var shiftKeyDown = (shiftKeyState & CoreVirtualKeyStates.Down) == CoreVirtualKeyStates.Down;
// If we're on the header item then this will be null and we'll still get the default behavior.
if (focusedItem is ListViewItem)
{
var currentItem = (ListViewItem)focusedItem;
bool onlastitem = currentItem != null && this.IndexFromContainer(currentItem) == this.Items.Count - 1;
bool onfirstitem = currentItem != null && this.IndexFromContainer(currentItem) == 0;
if (!shiftKeyDown)
{
if (onlastitem)
{
this.TryMoveFocus(FocusNavigationDirection.Next);
return; // not handled
}
else
{
this.TryMoveFocus(FocusNavigationDirection.Down);
}
}
else // Shift + Tab
{
if (onfirstitem)
{
this.TryMoveFocus(FocusNavigationDirection.Previous);
}
else
{
this.TryMoveFocus(FocusNavigationDirection.Up);
}
}
}
else if (focusedItem is Control)
{
return; // not handled
}
e.Handled = true;
break;
case VirtualKey.Space:
case VirtualKey.Enter:
ElementSoundPlayer.Play(ElementSoundKind.Invoke);
// Fire our event using the item with current keyboard focus
this.InvokeItem(focusedItem);
e.Handled = true;
break;
default:
base.OnKeyDown(e);
break;
}
}
/// <summary>
/// This method is a work-around until the bug in FocusManager.TryMoveFocus is fixed.
/// </summary>
/// <param name="direction"></param>
private void TryMoveFocus(FocusNavigationDirection direction)
{
ElementSoundPlayer.Play(ElementSoundKind.Focus);
FocusManager.TryMoveFocus(direction);
}
private void ItemClickedHandler(object sender, ItemClickEventArgs e)
{
// Triggered when the item is selected using something other than a keyboard
var item = this.ContainerFromItem(e.ClickedItem);
this.InvokeItem(item);
}
private void InvokeItem(object focusedItem)
{
this.SetSelectedItem(focusedItem as ListViewItem);
this.ItemInvoked(this, focusedItem as ListViewItem);
if (this.splitViewHost.IsPaneOpen)
{
if (this.splitViewHost.DisplayMode == SplitViewDisplayMode.CompactOverlay ||
this.splitViewHost.DisplayMode == SplitViewDisplayMode.Overlay)
{
this.splitViewHost.IsPaneOpen = false;
}
if (focusedItem is ListViewItem)
{
((ListViewItem)focusedItem).Focus(FocusState.Programmatic);
}
}
}
/// <summary>
/// Re-size the ListView's Panel when the SplitView is compact so the items
/// will fit within the visible space and correctly display a keyboard focus rect.
/// </summary>
private void OnPaneToggled()
{
if (this.splitViewHost.IsPaneOpen)
{
this.ItemsPanelRoot.ClearValue(FrameworkElement.WidthProperty);
this.ItemsPanelRoot.ClearValue(FrameworkElement.HorizontalAlignmentProperty);
}
else if (this.splitViewHost.DisplayMode == SplitViewDisplayMode.CompactInline ||
this.splitViewHost.DisplayMode == SplitViewDisplayMode.CompactOverlay)
{
this.ItemsPanelRoot.SetValue(FrameworkElement.WidthProperty, this.splitViewHost.CompactPaneLength);
this.ItemsPanelRoot.SetValue(FrameworkElement.HorizontalAlignmentProperty, HorizontalAlignment.Left);
}
}
}
}

Просмотреть файл

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="eda1f0f1-788e-470f-8d7b-d26544355aaa" Publisher="CN=nkramer" Version="1.0.2.0" />
<mp:PhoneIdentity PhoneProductId="eda1f0f1-788e-470f-8d7b-d26544355aaa" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Presidents</DisplayName>
<PublisherDisplayName>nkramer</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="Presidents.App">
<uap:VisualElements DisplayName="Presidents" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="Presidents" BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png">
</uap:DefaultTile>
<uap:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="black" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

Просмотреть файл

@ -0,0 +1,811 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Imaging;
namespace Presidents
{
public class President
{
public string FirstName{get; set;}
public string LastName{get; set;}
public string NickName { get; set; }
// "1st president"
public string PresidentNumber { get; set; }
public string YearsInOffice{get; set;}
public string Party{get; set;}
public string State{get; set;}
public string VP { get; set; }
public string Summary{get; set;}
public Uri Image { get; set; }
public ImageSource ImageSource
{
get
{
return new BitmapImage(this.Image);
}
}
public string AutomationImageName
{
get
{
return "Picture of " + FullName;
}
}
public int TermLength
{
get
{
int dashPos = YearsInOffice.IndexOf('-');
if (dashPos == -1) return 1;
string start = YearsInOffice.Substring(0, dashPos);
string end = YearsInOffice.Substring(dashPos + 1, 4);
int result = int.Parse(end) - int.Parse(start);
return result;
}
}
public string YearsInParens
{
get
{
string result = "";
int spacePos = YearsInOffice.IndexOf(' ');
if (spacePos == -1)
result = YearsInOffice;
else
result = YearsInOffice.Substring(0, spacePos);
result = "(" + result + ")";
return result;
}
}
public string FullName
{
get { return FirstName + " " + LastName; }
}
public static President[] AllPresidents = new President[] {
new President()
{
FirstName="George",
LastName="Washington",
NickName="Father of our country",
PresidentNumber="1st president",
YearsInOffice="1789-1797 (2 terms)",
Party="Independent",
State="Virginia",
VP="John Adams",
Summary="George Washington was the first President of the United States (1789–97), the Commander-in-Chief of the Continental Army during the American Revolutionary War, and one of the Founding Fathers of the United States. He presided over the convention that drafted the current United States Constitution and during his lifetime was called the \"father of his country\"."
+ "\n\nWidely admired for his strong leadership qualities, Washington was unanimously elected president in the first two national elections. He oversaw the creation of a strong, well-financed national government that maintained neutrality in the French Revolutionary Wars, suppressed the Whiskey Rebellion, and won acceptance among Americans of all types.",
//Image=new Uri("ms-appx:///Assets/Gilbert_Stuart_Williamstown_Portrait_of_George_Washington.jpg"),
Image=new Uri("ms-appx:///Assets/WashingtonCropped.jpg"),
},
new President()
{
FirstName="John",
LastName="Adams",
NickName="His Rotundity",
PresidentNumber="2nd president",
YearsInOffice="1797-1801",
Party="Federalist",
State="Massachusetts",
VP="Thomas Jefferson",
Summary="John Adams, Jr. (October 30 [O.S. October 19] 1735 – July 4, 1826) was an American lawyer, author, statesman, and diplomat. He served as the second President of the United States (1797–1801), the first Vice President (1789–97), and as a Founding Father was a leader of American independence from Great Britain.",
Image=new Uri("ms-appx:///Assets/Official_Presidential_portrait_of_John_Adams_(by_John_Trumbull,_circa_1792).jpg"),
},
new President()
{
FirstName="Thomas",
LastName="Jefferson",
NickName="The Apostle of Democracy",
PresidentNumber="3rd president",
YearsInOffice="1801-1809 (2 terms)",
Party="Democratic-Republican",
State="Virginia",
VP="Aaron Burr and George Clinton",
Summary="Thomas Jefferson (April 13 [O.S. April 2] 1743 – July 4, 1826) was an American Founding Father who was principal author of the Declaration of Independence (1776). He was elected the second Vice President of the United States (1797–1801), serving under John Adams and in 1800 was elected third President (1801–09).",
//Image=new Uri("ms-appx:///Assets/Thomas_Jefferson_by_Rembrandt_Peale,_1800.jpg"),
Image=new Uri("ms-appx:///Assets/Official_Presidential_portrait_of_Thomas_Jefferson_(by_Rembrandt_Peale,_1800).jpg"),
},
new President()
{
FirstName="James",
LastName="Madison",
NickName="Little Jemmy",
PresidentNumber="4th president",
YearsInOffice="1809-1817 (2 terms)",
Party="Democratic-Republican",
State="Virginia",
VP="George Clinton and Elbridge Gerry",
Summary="James Madison, Jr. (March 16, 1751 – June 28, 1836) was a political theorist, American statesman, and served as the fourth President of the United States (1809–17). He is hailed as the \"Father of the Constitution\" for his pivotal role in drafting and promoting the U.S. Constitution and the Bill of Rights.",
//Image=new Uri("ms-appx:///Assets/165px-James_Madison.jpg"),
Image=new Uri("ms-appx:///Assets/1024px-James_Madison.jpg"),
},
new President()
{
FirstName="James",
LastName="Monroe",
NickName="The Last Cocked Hat",
PresidentNumber="5th president",
YearsInOffice="1817-1825 (2 terms)",
Party="Democratic-Republican",
State="Virginia",
VP="Daniel D. Tompkins",
Summary="James Monroe (April 28, 1758 – July 4, 1831) was the fifth President of the United States, serving between 1817 and 1825. Monroe was the last president who was a Founding Father of the United States and the last president from the Virginian dynasty and the Republican Generation.",
//Image=new Uri("ms-appx:///Assets/James_Monroe_White_House_portrait_1819.gif"),
Image=new Uri("ms-appx:///Assets/James_Monroe_White_House_portrait_1819.gif"),
},
new President()
{
FirstName="John Quincy",
LastName="Adams",
NickName="Old Man Eloquent",
PresidentNumber="6th president",
YearsInOffice="1825-1829",
Party="Democratic-Republican",
State="Massachusetts",
VP="John C. Calhoun",
Summary="John Quincy Adams (July 11, 1767 – February 23, 1848) was an American statesman who served as the sixth President of the United States from 1825 to 1829. He also served as a diplomat, a Senator and member of the House of Representatives. He was a member of the Federalist, Democratic-Republican, National Republican, and later Anti-Masonic and Whig parties.",
Image=new Uri("ms-appx:///Assets/JQA_Photo_tif.jpg"),
},
new President()
{
FirstName="Andrew",
LastName="Jackson",
NickName="Old Hickory",
PresidentNumber="7th president",
YearsInOffice="1829-1837 (2 terms)",
Party="Democratic",
State="Tennessee",
VP="John C. Calhoun and Martin Van Buren",
Summary="Andrew Jackson (March 15, 1767 – June 8, 1845) was the seventh President of the United States (1829–37). He was born near the end of the colonial era, somewhere near the then-unmarked border between North and South Carolina, into a recently immigrated Scots-Irish farming family of relatively modest means.",
Image=new Uri("ms-appx:///Assets/Andrew_Jackson_Daguerrotype-crop.jpg"),
},
new President()
{
FirstName="Martin",
LastName="Van Buren",
NickName="Little Magician",
PresidentNumber="8th president",
YearsInOffice="1837-1841",
Party="Democratic",
State="New York",
VP="Richard Mentor Johnson",
Summary="Martin Van Buren (December 5, 1782 – July 24, 1862) was an American politician who served as the eighth President of the United States (1837–41). A member of the Democratic Party, he served in a number of senior roles, including eighth Vice President (1833–37) and tenth Secretary of State (1829–31), both under Andrew Jackson.",
Image=new Uri("ms-appx:///Assets/Martin_Van_Buren_by_Mathew_Brady_c1855-58.jpg"),
},
new President()
{
FirstName="William Henry",
LastName="Harrison",
NickName="General Mum",
PresidentNumber="9th president",
YearsInOffice="1841",
Party="Whig",
State="Ohio",
VP="John Tyler",
Summary="William Henry Harrison (February 9, 1773 – April 4, 1841) was the ninth President of the United States (1841), an American military officer and politician, and the last President born as a British subject. He was also the first president to die in office. He was 68 years, 23 days old when inaugurated, the oldest president to take office until Ronald Reagan in 1981.",
Image=new Uri("ms-appx:///Assets/165px-William_Henry_Harrison_daguerreotype_edit.jpg"),
},
new President()
{
FirstName="John",
LastName="Tyler",
NickName="His Accidency",
PresidentNumber="10th president",
YearsInOffice="1841-1845",
Party="Whig and Independent",
State="Virginia",
VP="Vacant",
Summary="John Tyler (March 29, 1790 – January 18, 1862) was the tenth President of the United States (1841–45). He was elected vice president on the 1840 Whig ticket with William Henry Harrison, and became president after his running mate's death in April 1841.",
Image=new Uri("ms-appx:///Assets/Tyler_Daguerreotype_(restoration).jpg"),
},
new President()
{
FirstName="James K.",
LastName="Polk",
NickName="Young Hickory",
PresidentNumber="11th president",
YearsInOffice="1845-1849 (1 term)",
Party="Democrat",
State="Tennessee",
VP="George M. Dallas",
Summary="James Knox Polk was the only president to have served as house speaker, and fulfilled all of his policies set during his campaign. He lead the sweeping victory in the Mexican-American war, seizing what is now the American Southwest.",
Image=new Uri("ms-appx:///Assets/JamesKPolk.jpg"),
},
new President()
{
FirstName="Zachary",
LastName="Taylor",
NickName="Old Rough and Ready",
PresidentNumber="12th president",
YearsInOffice="1849-1850 (<1 term)",
Party="Whig",
State="Tennessee",
VP="Millard Fillmore",
Summary="Zachary Taylor won the presidency despite his lack of interest in politics, it's believed that his status as a national war hero in the Mexican-American war won him his election. He died 17 months into his election, due to an \"unknown digestive ailment\".",
Image=new Uri("ms-appx:///Assets/Zachary_Taylor.png"),
},
new President()
{
FirstName="Millard",
LastName="Fillmore",
PresidentNumber="13th president",
YearsInOffice="1850-1853 (1 term)",
Party="Whig",
State="New York",
VP="None",
Summary="Millard Fillmore was the last \"Whig\" president, meaning he was not associated with either the Republican or Democrat party. When the Whig party broke up in 1854-1856 (after his term), Millard refused to join any party.",
Image=new Uri("ms-appx:///Assets/Millard_Fillmore_by_Brady_Studio.jpg"),
},
new President()
{
FirstName="Franklin",
LastName="Pierce",
PresidentNumber="14th president",
YearsInOffice="1853-1857 (1 term)",
Party="Democrat",
State="New Hampshire",
VP="William R. King (1853), None (1853-1857)",
Summary="Franklin Pierce disliked the abolitionist movement (the movement to end slavery in America) and in signing the Kansas-Nebraska Act set the stage for the attempted Southern secession. He was seen as a \"compromise\" candidate by the Democrats, and was not elected for a second term.",
Image=new Uri("ms-appx:///Assets/Franklin_Pierce_MathewBrady.jpg"),
},
new President()
{
FirstName="James",
LastName="Buchanan",
NickName="Doughface",
PresidentNumber="15th president",
YearsInOffice="1857-1861 (1 term)",
Party="Democrat",
State="Pennsylvania",
VP="John C. Breckinridge",
Summary="James Buchanan Jr. served as president immediately before the Civil War. It is believed that his efforts to maintain peace between the North and South resulted in only alienating both sides even more. He desired to be ranked in history among George Washington were unfulfilled due to his inability to find peace between the North and South.",
Image=new Uri("ms-appx:///Assets/James_Buchanan.jpg"),
},
new President()
{
FirstName="Abraham",
LastName="Lincoln",
NickName="Honest Abe",
PresidentNumber="16th president",
YearsInOffice="1861-1865 (1 term)",
Party="Republican",
State="Illinois",
VP="Hannibal Hamlin (1861-1865), Andrew Johnson (1865)",
Summary="Abraham Lincoln served only 1 term before his infamous assassination on April, 1865. He led the country through the Civil War and managed to preserve the Union and abolish slavery during that time. He was mainly self-educated and was originally a member of the Whig party, before becoming Republican in 1854.",
Image=new Uri("ms-appx:///Assets/Abraham_Lincoln.jpg"),
},
new President()
{
FirstName="Andrew",
LastName="Johnson",
PresidentNumber="17th president",
YearsInOffice="1865-1869 (1 term)",
Party="Democrat",
State="Tennessee",
VP="None",
Summary="Andrew Johnson became president through the face that he was vice president at the time of Abraham Lincoln's assassination. He came into conflict with the largely Republican dominated Congress, and was the first president to be impeached after 1 term.",
Image=new Uri("ms-appx:///Assets/Andrew_Johnson.jpg"),
},
new President()
{
FirstName="Ulysses S.",
LastName="Grant",
NickName="Sam",
PresidentNumber="18th president",
YearsInOffice="1869-1877 (2 term)",
Party="Republican",
State="Ohio",
VP="Schuyler Colfax (1869-1873), Henry Wilson (1873-1875), None (1875-1877)",
Summary="Ulysses S. Grant worked closly with former president Abraham Lincoln during the Civil War to help him lead the Union Army to victory over the Confederacy. He struggled financially in civilian life and has been criticized for corruption and leading the nation into a severe economic depression during his second term.",
Image=new Uri("ms-appx:///Assets/Ulysses_Grant.jpg"),
},
new President()
{
FirstName="Rutherford B.",
LastName="Hayes",
PresidentNumber="19th president",
YearsInOffice="1877-1881 (1 term)",
Party="Republican",
State="Ohio",
VP="William Wheeler",
Summary="Rutherford B. Hayes had strong beliefs in meritocratic government, equal treatment without regard to race, and improvement through education. During his presidency he oversaw the end of the Reconstruction (started by Ulysses Grant), and began to lead the nation to civil service reform. He was also left (and attempted) to reconcile the divisions left over from the Civil War.",
Image=new Uri("ms-appx:///Assets/Rutherford_Hayes_MathewBrady.jpg"),
},
new President()
{
FirstName="James",
LastName="Garfield",
NickName=" ",
PresidentNumber="20th president",
YearsInOffice="1881-1881 (assassinated)",
Party="Republican",
State="Ohio",
VP="Chester A. Arthur",
Summary="James Abram Garfield (November 19, 1831 – September 19, 1881) was the 20th President of the United States, serving from March 4, 1881, until his assassination later that year. Garfield had served nine terms in the House of Representatives, and had been elected to the Senate before his candidacy for the White House, though he declined the senatorship once he was president-elect. He is the only sitting House member to be elected president.",
Image=new Uri("ms-appx:///Assets/garfield20.jpg"),
},
new President()
{
FirstName="Chester",
LastName="Arthur",
NickName=" ",
PresidentNumber="21st president",
YearsInOffice="1881-1885 (1 term)",
Party="Republican",
State="New York",
VP="Vacant",
Summary="Chester Alan Arthur (October 5, 1829 – November 18, 1886) was an American attorney and politician who served as the 21st President of the United States (1881–85); he succeeded James A. Garfield upon the latter's assassination. At the outset, Arthur struggled to overcome a slightly negative reputation, which stemmed from his early career in politics as part of New York's Republican political machine. He succeeded by embracing the cause of civil service reform. His advocacy for, and subsequent enforcement of, the Pendleton Civil Service Reform Act was the centerpiece of his administration.",
Image=new Uri("ms-appx:///Assets/arthur21.jpg"),
},
new President()
{
FirstName="Grover",
LastName="Cleveland",
NickName=" ",
PresidentNumber="22nd president",
YearsInOffice="1885-1889 (1st term)",
Party="Democrat",
State="New York",
VP="Thomas A. Hendricks",
Summary="Stephen Grover Cleveland (March 18, 1837 – June 24, 1908) was the 22nd and 24th President of the United States. He was the winner of the popular vote for president three times – in 1884, 1888, and 1892 – and was one of the three Democrats (with Andrew Johnson and Woodrow Wilson) to serve as president during the era of Republican political domination dating from 1861 to 1933.",
Image=new Uri("ms-appx:///Assets/grover22.png"),
},
new President()
{
FirstName="Benjamin",
LastName="Harrison",
NickName=" ",
PresidentNumber="23rd president",
YearsInOffice="1889-1893 (1 term)",
Party="Republican",
State="Indiana",
VP="Levi P. Morton",
Summary="Benjamin Harrison (August 20, 1833 – March 13, 1901) was the 23rd President of the United States (1889–93); he was the grandson of the ninth President, William Henry Harrison. Before ascending to the presidency, Harrison established himself as a prominent local attorney, Presbyterian church leader and politician in Indianapolis, Indiana. During the American Civil War, he served the Union as a colonel and on February 14, 1865 was confirmed by the U.S. Senate as a brevet brigadier general of volunteers to rank from January 23, 1865. After the war, he unsuccessfully ran for the governorship of Indiana. He was later elected to the U.S. Senate by the Indiana legislature.",
Image=new Uri("ms-appx:///Assets/harrison23.jpg"),
},
new President()
{
FirstName="Grover",
LastName="Cleveland",
NickName=" ",
PresidentNumber="24th president",
YearsInOffice="1893-1987 (2nd term)",
Party="Democrat",
State="New York",
VP="Adlai Stevenson",
Summary="Stephen Grover Cleveland (March 18, 1837 – June 24, 1908) was the 22nd and 24th President of the United States. He was the winner of the popular vote for president three times – in 1884, 1888, and 1892 – and was one of the three Democrats (with Andrew Johnson and Woodrow Wilson) to serve as president during the era of Republican political domination dating from 1861 to 1933.",
Image=new Uri("ms-appx:///Assets/grover24.jpg"),
},
new President()
{
FirstName="William",
LastName="McKinley",
NickName=" ",
PresidentNumber="25th president",
YearsInOffice="1897-1901 (1 term)",
Party="Republican",
State="Ohio",
VP="Theodore Roosevelt",
Summary="William McKinley (January 29, 1843 – September 14, 1901) was the 25th President of the United States, serving from March 4, 1897, until his assassination in September 1901, six months into his second term. McKinley led the nation to victory in the Spanish–American War, raised protective tariffs to promote American industry, and maintained the nation on the gold standard in a rejection of inflationary proposals.",
Image=new Uri("ms-appx:///Assets/mckinley25.jpg"),
},
new President()
{
FirstName="Theodore",
LastName="Roosevelt",
NickName=" ",
PresidentNumber="26th president",
YearsInOffice="1901-1909 (2 terms)",
Party="Republican",
State="New York",
VP="Charles W. Fairbanks",
Summary="Theodore Roosevelt (October 27, 1858 – January 6, 1919) was an American statesman, author, explorer, soldier, naturalist, and reformer who served as the 26th President of the United States from 1901 to 1909. As a leader of the Republican Party during this time, he became a driving force for the Progressive Era in the United States in the early 20th century.",
Image=new Uri("ms-appx:///Assets/roosevelt26.jpg"),
},
new President()
{
FirstName="William",
LastName="Taft",
PresidentNumber="27th president",
YearsInOffice="1909–1913 (1 term)",
Party="Republican",
State="Ohio",
VP="James S. Sherman:- March 4, 1909 – October 30, 1912, Vacant:-October 30, 1912 – March 4, 1913",
Summary="William Howard Taft (September 15, 1857 – March 8, 1930) served as the 27th President of the United States (1909–1913) and as the 10th Chief Justice of the United States Supreme Court (1921–1930), the only person to have held both offices.",
Image=new Uri("ms-appx:///Assets/William_Howard_Taft_1909.jpg"),
},
new President()
{
FirstName="Woodrow",
LastName="Wilson",
PresidentNumber="28th president",
YearsInOffice="1913-1921",
Party="Democratic",
State="New Jersey",
VP="Thomas R.Marshall",
Summary="Thomas Woodrow Wilson, known as Woodrow Wilson (December 28, 1856 – February 3, 1924), was an American politician and academic who served as the 28th President of the United States from 1913 to 1921.",
Image=new Uri("ms-appx:///Assets/President_Wilson_1919_tif.jpg"),
},
new President()
{
FirstName="Warren",
LastName="Harding",
PresidentNumber="29th president",
YearsInOffice="1921-1923",
Party="Republican",
State="Ohio",
VP="Calvin Coolidge",
Summary="Warren Gamaliel Harding (November 2, 1865 – August 2, 1923) was the 29th President of the United States, serving from March 4, 1921 until his death.",
Image=new Uri("ms-appx:///Assets/Warren_G_Harding-Harris_&_Ewing.jpg"),
},
new President()
{
FirstName="Calvin",
LastName="Coolidge",
PresidentNumber="30th president",
YearsInOffice="1923-1929",
Party="Republican",
State="Massachusetts",
VP="Charles.D.Dawes",
Summary="John Calvin Coolidge Jr. (July 4, 1872 – January 5, 1933) was the 30th President of the United States (1923–29).",
Image=new Uri("ms-appx:///Assets/Calvin_Coolidge_cph_3g10777.jpg"),
},
new President()
{
FirstName="Herbert",
LastName="Hoover",
NickName="The Great Engineer",
PresidentNumber="31st president",
YearsInOffice="1929-1933",
Party="Republican",
State="Iowa",
VP="Charles Curtis",
Summary="Herbert Clark Hoover (August 10, 1874 – October 20, 1964) was the 31st President of the United States (1929–33).",
Image=new Uri("ms-appx:///Assets/President_Hoover_portrait_tif.jpg"),
},
new President()
{
FirstName="Franklin",
LastName="Roosevelt",
NickName="FDR",
PresidentNumber="32nd president",
YearsInOffice="1933-1945",
Party="Democratic",
State="New York",
VP="John Nance Garner March 4, 1933 – January 20, 1941, Henry A. Wallace January 20, 1941 – January 20, 1945, Harry S. Truman January 20, 1945 – April 12, 1945",
Summary="Franklin Delano Roosevelt (January 30, 1882 – April 12, 1945), commonly known as FDR, was an American statesman and political leader who served as the President of the United States from 1933 to 1945.",
Image=new Uri("ms-appx:///Assets/Franklin_D__Roosevelt.jpg"),
},
new President()
{
FirstName="Harry",
LastName="Truman",
PresidentNumber="33rd president",
YearsInOffice="1945-1953",
Party="Democratic",
State="Missouri",
VP="John Nance Garner March 4, 1933 – January 20, 1941, Henry A. Wallace January 20, 1941 – January 20, 1945, Harry S. Truman January 20, 1945 – April 12, 1945",
Summary="Harry S. Truman(May 8, 1884 – December 26, 1972) was the 33rd President of the United States (1945–53), an American politician of the Democratic Party.",
Image=new Uri("ms-appx:///Assets/Harry_S__Truman.jpg"),
},
new President()
{
FirstName="Dwight",
LastName="Eisenhover",
NickName="Ike",
PresidentNumber="34th president",
YearsInOffice="1953-1961",
Party="Republican",
State="Kansas",
VP="Richard Nixon",
Summary="Dwight David \"Ike\" Eisenhower (October 14, 1890 – March 28, 1969) was the 34th President of the United States from 1953 until 1961.",
Image=new Uri("ms-appx:///Assets/President_Eisenhower.jpg"),
},
new President()
{
FirstName="John",
LastName="Kennedy",
NickName="JFK",
PresidentNumber="34th president",
YearsInOffice="1961-1963",
Party="Democratic",
State="Massachusetts",
VP="Lyndon.B. Johnson",
Summary="John Fitzgerald \"Jack\" Kennedy (May 29, 1917 – November 22, 1963), commonly referred to by his initials JFK, was an American politician who served as the 35th President of the United States from January 1961 until his assassination in November 1963.",
Image=new Uri("ms-appx:///Assets/John_F__Kennedy.jpg"),
},
new President()
{
FirstName="Lyndon B.",
LastName="Johnson",
NickName="Light-Bulb Lyndon",
PresidentNumber="36th president",
YearsInOffice="1963-1969 (1.5 terms)",
Party="Democratic",
State="Texas",
VP="Hubert Humphrey",
Summary="Lyndon Baines Johnson, often referred to as LBJ, was the 36th President of the United States from 1963 to 1969, assuming the office after serving as the 37th Vice President of the United States from 1961 to 1963. Johnson was a Democrat from Texas, who served as a United States Representative from 1937 to 1949 and as a United States Senator from 1949 to 1961. He spent six years as Senate Majority Leader, two as Senate Minority Leader, and two as Senate Majority Whip.",
Image=new Uri("ms-appx:///Assets/Lyndon_B._Johnson_Oval_Office_Portrait.jpg"),
},
new President()
{
FirstName="Richard",
LastName="Nixon",
NickName="Tricky Dick",
PresidentNumber="37th president",
YearsInOffice="1969-1974 (1.5 terms)",
Party="Republican",
State="California",
VP="Spiro Agnew, Gerald Ford",
Summary="Richard Milhous Nixon was the 37th President of the United States, serving from 1969 to 1974 when he became the only U.S. president to resign the office. Nixon had previously served as a U.S. Representative and Senator from California and as the 36th Vice President of the United States from 1953 to 1961.",
Image=new Uri("ms-appx:///Assets/Richard_M._Nixon_NARA_-_530679.jpg"),
},
new President()
{
FirstName="Gerald",
LastName="Ford",
NickName="Mr. Nice Guy",
PresidentNumber="38th president",
YearsInOffice="1974-1977 (1 term)",
Party="Republican",
State="Michigan",
VP="Nelson Rockefeller",
Summary="Gerald Rudolph Ford Jr. was an American politician who served as the 38th President of the United States from 1974 to 1977. Prior to this he was the 40th Vice President of the United States, serving from 1973 until President Richard Nixon's resignation in 1974. He was the first person appointed to the vice presidency under the terms of the 25th Amendment, following the resignation of Vice President Spiro Agnew on October 10, 1973. Becoming president upon Richard Nixon's departure on August 9, 1974, he claimed the distinction as the first and to date the only person to have served as both Vice President and President of the United States without being elected to either office. Before ascending to the vice presidency, Ford served 25 years as Representative from Michigan's 5th congressional district, the final 9 of them as the House Minority Leader.",
Image=new Uri("ms-appx:///Assets/Gerald_Ford_-_NARA_-_530680.jpg"),
},
new President()
{
FirstName="Jimmy",
LastName="Carter",
NickName="The Peanut Farmer",
PresidentNumber="39th president",
YearsInOffice="1977-1981 (1 term)",
Party="Democratic",
State="Georgia",
VP="Walter Mondale",
Summary="James Earl \"Jimmy\" Carter, Jr. is an American politician and author who served as the 39th President of the United States from 1977 to 1981. In 2002, he was awarded the Nobel Peace Prize for his work with the Carter Center.",
Image=new Uri("ms-appx:///Assets/James_Earl__Jimmy__Carter_-_NARA_-_558522.jpg"),
},
new President()
{
FirstName="Ronald",
LastName="Reagan",
NickName="The Great Communicator",
PresidentNumber="40th president",
YearsInOffice="1981-1989 (2 terms)",
Party="Republican",
State="California",
VP="George H. W. Bush",
Summary="Ronald Wilson Reagan was an American politician and actor, who served as the 40th President of the United States from 1981 to 1989. Prior to his presidency, he served as the 33rd Governor of California from 1967 to 1975, following a career as a Hollywood actor and union leader.",
Image=new Uri("ms-appx:///Assets/Official_Portrait_of_President_Reagan_1981.jpg"),
},
new President()
{
FirstName="George H. W.",
LastName="Bush",
NickName="Poppy",
PresidentNumber="41st president",
YearsInOffice="1989-1993 (1 term)",
Party="Republican",
State="Texas",
VP="Dan Quayle",
Summary="George Herbert Walker Bush is an American politician who served as the 41st President of the United States (1989–93), and the 43rd Vice President of the United States (1981–89). A Republican, he previously served as a congressman, an ambassador, and Director of Central Intelligence. He is the oldest living former President and Vice President. He is also the last living former President who is a veteran of World War II. Bush is often referred to as \"George H. W. Bush\", \"Bush 41\", \"Bush the Elder\", or \"George Bush Sr.\" to distinguish him from his eldest son, George W. Bush, who was the 43rd President of the United States. Prior to his son's presidency, he was known simply as George Bush or President Bush.",
Image=new Uri("ms-appx:///Assets/George_H._W._Bush_President_of_the_United_States_1989_official_portrait.jpg"),
},
new President()
{
FirstName="Bill",
LastName="Clinton",
NickName="Bubba",
PresidentNumber="42nd president",
YearsInOffice="1993-2001 (2 terms)",
Party="Democratic",
State="Arkansas",
VP="Al Gore",
Summary="William Jefferson \"Bill\" Clinton is an American politician who served as the 42nd President of the United States from 1993 to 2001. He previously served as Governor of Arkansas from 1979 to 1981 and 1983 to 1992, and as the state's Attorney General from 1977 to 1979. A member of the Democratic Party, ideologically Clinton was a New Democrat, and many of his policies reflected a centrist Third Way philosophy of governance.",
Image=new Uri("ms-appx:///Assets/44_Bill_Clinton_3x4.jpg"),
},
new President()
{
FirstName="George W.",
LastName="Bush",
NickName="Bush Jr.",
PresidentNumber="43rd president",
YearsInOffice="2001-2009 (2 terms)",
Party="Republican",
State="Texas",
VP="Dick Cheney",
Summary="George Walker Bush is an American politician and businessman who served as the 43rd President of the United States from 2001 to 2009, and the 46th Governor of Texas from 1995 to 2000. The eldest son of Barbara and George H. W. Bush, he was born in New Haven, Connecticut. After graduating from Yale University in 1968 and Harvard Business School in 1975, he worked in oil businesses. He married Laura Welch in 1977 and ran unsuccessfully for the House of Representatives shortly thereafter. He later co-owned the Texas Rangers baseball team before defeating Ann Richards in the 1994 Texas gubernatorial election. He was elected president in 2000 after a close and controversial election, becoming the fourth president to be elected while receiving fewer popular votes nationwide than his opponent.[6] He is the second president to have been the son of a former president, the first having been John Quincy Adams.[7] He is also the brother of Jeb Bush, a former Governor of Florida and former candidate for the Republican presidential nomination in the 2016 presidential election.",
Image=new Uri("ms-appx:///Assets/George-W-Bush.jpg"),
},
new President()
{
FirstName="Barack",
LastName="Obama",
PresidentNumber="44th president",
YearsInOffice="2009-2016 (2 terms)",
Party="Democratic",
State="Illinois",
VP="Joe Biden",
Summary="Barack Hussein Obama II is an American politician serving as the 44th President of the United States, the first African American to hold the office. Born in Honolulu, Hawaii, Obama is a graduate of Columbia University and Harvard Law School, where he served as president of the Harvard Law Review. He was a community organizer in Chicago before earning his law degree. He worked as a civil rights attorney and taught constitutional law at University of Chicago Law School between 1992 and 2004. He served three terms representing the 13th District in the Illinois Senate from 1997 to 2004, and ran unsuccessfully in the Democratic primary for the United States House of Representatives in 2000 against incumbent Bobby Rush.",
Image=new Uri("ms-appx:///Assets/President_Barack_Obama.jpg"),
},
};
public static ObservableCollection<President> FilteredPresidents = new ObservableCollection<President>();
public static void SetFilteredPresidents(IEnumerable<President> i)
{
FilteredPresidents.Clear();
foreach (var p in i)
{
FilteredPresidents.Add(p);
}
}
static President()
{
SetFilteredPresidents(AllPresidents);
}
}
}

Просмотреть файл

@ -0,0 +1,236 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{2311E5BA-EC41-4DCB-911F-7CD127217A2B}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Presidents</RootNamespace>
<AssemblyName>Presidents</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageCertificateKeyFile>Presidents_TemporaryKey.pfx</PackageCertificateKeyFile>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxBundle>Never</AppxBundle>
<AppxBundlePlatforms>x64</AppxBundlePlatforms>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>false</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
</ItemGroup>
<ItemGroup>
<Compile Include="AllPresidentsView.xaml.cs">
<DependentUpon>AllPresidentsView.xaml</DependentUpon>
</Compile>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="CompareView.xaml.cs">
<DependentUpon>CompareView.xaml</DependentUpon>
</Compile>
<Compile Include="DetailsView.xaml.cs">
<DependentUpon>DetailsView.xaml</DependentUpon>
</Compile>
<Compile Include="IsTenFootTrigger.cs" />
<Compile Include="ImageConverter.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="NavMenuItem.cs" />
<Compile Include="NavMenuListView.cs" />
<Compile Include="President.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="Presidents_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\1024px-James_Madison.jpg" />
<Content Include="Assets\165px-James_Madison.jpg" />
<Content Include="Assets\165px-William_Henry_Harrison_daguerreotype_edit.jpg" />
<Content Include="Assets\44_Bill_Clinton_3x4.jpg" />
<Content Include="Assets\Abraham_Lincoln.jpg" />
<Content Include="Assets\Andrew_Jackson_Daguerrotype-crop.jpg" />
<Content Include="Assets\Andrew_Johnson.jpg" />
<Content Include="Assets\arthur21.jpg" />
<Content Include="Assets\Calvin_Coolidge_cph_3g10777.jpg" />
<Content Include="Assets\CodeFile.txt" />
<Content Include="Assets\declaration_of_independence.JPG" />
<Content Include="Assets\emancipation.JPG" />
<Content Include="Assets\Flag_of_the_United_States.svg.png" />
<Content Include="Assets\Franklin_D__Roosevelt.jpg" />
<Content Include="Assets\Franklin_Pierce_MathewBrady.jpg" />
<Content Include="Assets\garfield20.jpg" />
<Content Include="Assets\George-W-Bush.jpg" />
<Content Include="Assets\George_H._W._Bush_President_of_the_United_States_1989_official_portrait.jpg" />
<Content Include="Assets\george_washington_deleware.JPG" />
<Content Include="Assets\Gerald_Ford_-_NARA_-_530680.jpg" />
<Content Include="Assets\Gilbert_Stuart_Williamstown_Portrait_of_George_Washington.jpg" />
<Content Include="Assets\grover22.png" />
<Content Include="Assets\grover24.jpg" />
<Content Include="Assets\harrison23.jpg" />
<Content Include="Assets\Harry_S__Truman.jpg" />
<Content Include="Assets\JamesKPolk.jpg" />
<Content Include="Assets\James_Buchanan.jpg" />
<Content Include="Assets\James_Earl__Jimmy__Carter_-_NARA_-_558522.jpg" />
<Content Include="Assets\James_Monroe_White_House_portrait_1819.gif" />
<Content Include="Assets\John_F__Kennedy.jpg" />
<Content Include="Assets\JQA_Photo_tif.jpg" />
<Content Include="Assets\Lyndon_B._Johnson_Oval_Office_Portrait.jpg" />
<Content Include="Assets\Martin_Van_Buren_by_Mathew_Brady_c1855-58.jpg" />
<Content Include="Assets\mckinley25.jpg" />
<Content Include="Assets\Millard_Fillmore_by_Brady_Studio.jpg" />
<Content Include="Assets\Official_Portrait_of_President_Reagan_1981.jpg" />
<Content Include="Assets\Official_Presidential_portrait_of_John_Adams_%28by_John_Trumbull,_circa_1792%29.jpg" />
<Content Include="Assets\Official_Presidential_portrait_of_Thomas_Jefferson_%28by_Rembrandt_Peale,_1800%29.jpg" />
<Content Include="Assets\President_Andrew_Johnson.jpg" />
<Content Include="Assets\President_Barack_Obama.jpg" />
<Content Include="Assets\President_Eisenhower.jpg" />
<Content Include="Assets\President_Hoover_portrait_tif.jpg" />
<Content Include="Assets\President_Wilson_1919_tif.jpg" />
<Content Include="Assets\Richard_M._Nixon_NARA_-_530679.jpg" />
<Content Include="Assets\roosevelt26.jpg" />
<Content Include="Assets\Rutherford_Hayes_MathewBrady.jpg" />
<Content Include="Assets\signing_constitution.JPG" />
<Content Include="Assets\The_Peacemakers_1868_cropped.jpg" />
<Content Include="Assets\Thomas_Jefferson_by_Rembrandt_Peale,_1800.jpg" />
<Content Include="Assets\Tyler_Daguerreotype_%28restoration%29.jpg" />
<Content Include="Assets\Ulysses_Grant.jpg" />
<Content Include="Assets\Warren_G_Harding-Harris_&amp;_Ewing.jpg" />
<Content Include="Assets\WashingtonCropped.JPG" />
<Content Include="Assets\William_Howard_Taft_1909.jpg" />
<Content Include="Assets\Zachary_Taylor.png" />
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="AllPresidentsView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="CompareView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="DetailsView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Styles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Page>
<Page Include="TvSafeColors.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Page>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- 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.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -0,0 +1,29 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Presidents")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Presidents")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

Просмотреть файл

@ -0,0 +1,31 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Seralize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>

Просмотреть файл

@ -0,0 +1,686 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Presidents">
<!-- window width adaptive snap points-->
<x:Double x:Key="MinWindowSnapPoint">0</x:Double>
<x:Double x:Key="MediumWindowSnapPoint">641</x:Double>
<x:Double x:Key="LargeWindowSnapPoint">1008</x:Double>
<!-- padding between window title bar and content-->
<x:Double x:Key="DesktopWindowTopPadding">20</x:Double>
<Style x:Key="SplitViewTogglePaneButtonStyle" TargetType="ToggleButton">
<Setter Property="FontSize" Value="16" />
<Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}" />
<Setter Property="MinHeight" Value="48" />
<Setter Property="MinWidth" Value="48" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="Transparent" />
<!--<Setter Property="Foreground" Value="{StaticResource SystemControlForegroundBaseHighBrush}" />-->
<Setter Property="Content" Value="&#xE700;" />
<Setter Property="AutomationProperties.Name" Value="Menu" />
<Setter Property="UseSystemFocusVisuals" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Grid Background="{TemplateBinding Background}" x:Name="LayoutRoot">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(TextBlock.Foreground)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Checked"/>
<VisualState x:Name="CheckedPointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="CheckedPressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="CheckedDisabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(TextBlock.Foreground)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<Setter Target="FocusBackground.Margin" Value="0,0,-300,0"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle x:Name="FocusBackground"
IsHitTestVisible="False"
Fill="Transparent"/>
<ContentPresenter x:Name="ContentPresenter"
Content="{TemplateBinding Content}"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SplitViewTogglePaneButtonXboxStyle" TargetType="ToggleButton" BasedOn="{StaticResource SplitViewTogglePaneButtonStyle}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Grid Background="{TemplateBinding Background}" x:Name="LayoutRoot">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(TextBlock.Foreground)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Checked"/>
<VisualState x:Name="CheckedPointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="CheckedPressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="CheckedDisabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(TextBlock.Foreground)">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundChromeWhiteBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundAccentBrush}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<VisualState.Setters>
<Setter Target="FocusBackground.Margin" Value="-48,0,-200,0"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle x:Name="FocusBackground"
IsHitTestVisible="False"
Fill="Transparent"
Margin="-48,0,0,0"
/>
<ContentPresenter x:Name="ContentPresenter"
Content="{TemplateBinding Content}"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SplitViewPaneButtonStyle" TargetType="Button">
<Setter Property="Padding" Value="0"/>
<Setter Property="Background" Value="Transparent" />
<Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="MinHeight" Value="48" />
<Setter Property="MinWidth" Value="48" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="UseSystemFocusVisuals" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard>
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid"/>
</Storyboard>
</VisualState>
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootGrid">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootGrid">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}"/>
</ObjectAnimationUsingKeyFrames>
<PointerDownThemeAnimation Storyboard.TargetName="RootGrid"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootGrid">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundBaseLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseMediumLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ContentPresenter">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledTransparentBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="FocusRect"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle x:Name="FocusRect" Fill="{StaticResource SystemControlHighlightListLowBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="0"/>
<ContentPresenter x:Name="ContentPresenter" AutomationProperties.AccessibilityView="Raw" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SplitViewPaneButtonXboxStyle" TargetType="Button" BasedOn="{StaticResource SplitViewPaneButtonStyle}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard>
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid"/>
</Storyboard>
</VisualState>
<VisualState x:Name="PointerOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootGrid">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootGrid">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}"/>
</ObjectAnimationUsingKeyFrames>
<PointerDownThemeAnimation Storyboard.TargetName="RootGrid"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootGrid">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundBaseLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseMediumLowBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ContentPresenter">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledTransparentBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="FocusRect"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundChromeWhiteBrush}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle x:Name="FocusRect" Fill="{StaticResource SystemControlBackgroundAccentBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="0"/>
<ContentPresenter x:Name="ContentPresenter" AutomationProperties.AccessibilityView="Raw" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="PageTitleTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource TitleTextBlockStyle}">
<Setter Property="FontSize" Value="28"/>
<Setter Property="TextWrapping" Value="NoWrap"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Margin" Value="24,0,0,0"/>
</Style>
<Style x:Key="NarrowPageTitleTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource PageTitleTextBlockStyle}">
<Setter Property="Margin" Value="0"/>
</Style>
<Style x:Key="NavMenuItemContainerStyle" TargetType="ListViewItem">
<Setter Property="MinWidth" Value="{StaticResource SplitViewCompactPaneThemeLength}"/>
<Setter Property="Height" Value="48"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="UseSystemFocusVisuals" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Grid x:Name="ContentBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard>
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
<VisualState x:Name="PointerOver">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="BorderBackground"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}" />
</ObjectAnimationUsingKeyFrames>
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="BorderBackground"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}" />
</ObjectAnimationUsingKeyFrames>
<PointerDownThemeAnimation TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
<VisualState x:Name="Selected">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="BorderBackground"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<DoubleAnimation Storyboard.TargetName="SelectedPipe"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Stroke">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
</ObjectAnimationUsingKeyFrames>
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
<VisualState x:Name="PointerOverSelected">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="BorderBackground"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<DoubleAnimation Storyboard.TargetName="SelectedPipe"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Stroke">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
</ObjectAnimationUsingKeyFrames>
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
<VisualState x:Name="PressedSelected">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="BorderBackground"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<DoubleAnimation Storyboard.TargetName="SelectedPipe"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Stroke">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
</ObjectAnimationUsingKeyFrames>
<PointerDownThemeAnimation TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="DisabledStates">
<VisualState x:Name="Enabled"/>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="ContentBorder"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="{ThemeResource ListViewItemDisabledThemeOpacity}"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle x:Name="BorderBackground"
IsHitTestVisible="False"
Fill="{ThemeResource SystemControlHighlightListAccentLowBrush}"
StrokeThickness="{ThemeResource ListBoxBorderThemeThickness}"
Opacity="0"
Control.IsTemplateFocusTarget="True"/>
<Rectangle x:Name="FocusBackground"
IsHitTestVisible="False"
Fill="Transparent"
Opacity="1"
Control.IsTemplateFocusTarget="True"/>
<Grid x:Name="ContentPresenterGrid"
Background="Transparent"
Margin="0,0,0,0">
<Grid.RenderTransform>
<TranslateTransform x:Name="ContentPresenterTranslateTransform"/>
</Grid.RenderTransform>
<Rectangle x:Name="SelectedPipe"
Opacity="0"
Width="4"
Height="24"
Fill="{ThemeResource SystemControlForegroundAccentBrush}"
Margin="{TemplateBinding Padding}"
VerticalAlignment="Center"
HorizontalAlignment="Left"/>
<ContentPresenter x:Name="ContentPresenter"
ContentTransitions="{TemplateBinding ContentTransitions}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}"/>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- TODO: 4.1 - Configure the nav menu to look more like an XBOX and use safe areas -->
<Style x:Key="NavMenuItemContainerXboxStyle" TargetType="ListViewItem" BasedOn="{StaticResource NavMenuItemContainerStyle}">
<Setter Property="MinWidth" Value="96"/>
<Setter Property="Height" Value="48"/>
<Setter Property="Padding" Value="48,0,0,0"/>
<Setter Property="UseSystemFocusVisuals" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Grid x:Name="ContentBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard>
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
<VisualState x:Name="PointerOver">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="BorderBackground"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}" />
</ObjectAnimationUsingKeyFrames>
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="BorderBackground"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}" />
</ObjectAnimationUsingKeyFrames>
<PointerDownThemeAnimation TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
<VisualState x:Name="Selected">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="BorderBackground"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Stroke">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
</ObjectAnimationUsingKeyFrames>
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
<VisualState x:Name="PointerOverSelected">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="BorderBackground"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Stroke">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
</ObjectAnimationUsingKeyFrames>
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
<VisualState x:Name="PressedSelected">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="BorderBackground"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="1"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Stroke">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
</ObjectAnimationUsingKeyFrames>
<PointerDownThemeAnimation TargetName="ContentPresenter" />
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="DisabledStates">
<VisualState x:Name="Enabled"/>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="ContentBorder"
Storyboard.TargetProperty="Opacity"
Duration="0"
To="{ThemeResource ListViewItemDisabledThemeOpacity}"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Unfocused"/>
<VisualState x:Name="Focused">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundChromeWhiteBrush}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundAccentBrush}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Rectangle x:Name="BorderBackground"
IsHitTestVisible="False"
Fill="{ThemeResource SystemControlHighlightListAccentLowBrush}"
StrokeThickness="{ThemeResource ListBoxBorderThemeThickness}"
Opacity="0"
Control.IsTemplateFocusTarget="True"/>
<Rectangle x:Name="FocusBackground"
IsHitTestVisible="False"
Fill="Transparent"
Opacity="1"
Control.IsTemplateFocusTarget="True"/>
<Grid x:Name="ContentPresenterGrid"
Background="Transparent"
Margin="0,0,0,0">
<Grid.RenderTransform>
<TranslateTransform x:Name="ContentPresenterTranslateTransform"/>
</Grid.RenderTransform>
<ContentPresenter x:Name="ContentPresenter"
ContentTransitions="{TemplateBinding ContentTransitions}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}"/>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

Просмотреть файл

@ -0,0 +1,64 @@
<!-- from https://msdn.microsoft.com/en-us/windows/uwp/input-and-devices/designing-for-tv#colors -->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Presidents">
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<SolidColorBrush x:Key="ApplicationPageBackgroundThemeBrush"
Color="#FF101010"/>
<Color x:Key="SystemAltHighColor">#FF101010</Color>
<Color x:Key="SystemAltLowColor">#33101010</Color>
<Color x:Key="SystemAltMediumColor">#99101010</Color>
<Color x:Key="SystemAltMediumHighColor">#CC101010</Color>
<Color x:Key="SystemAltMediumLowColor">#66101010</Color>
<Color x:Key="SystemBaseHighColor">#FFEBEBEB</Color>
<Color x:Key="SystemBaseLowColor">#33EBEBEB</Color>
<Color x:Key="SystemBaseMediumColor">#99EBEBEB</Color>
<Color x:Key="SystemBaseMediumHighColor">#CCEBEBEB</Color>
<Color x:Key="SystemBaseMediumLowColor">#66EBEBEB</Color>
<Color x:Key="SystemChromeAltLowColor">#FFDDDDDD</Color>
<Color x:Key="SystemChromeBlackHighColor">#FF101010</Color>
<Color x:Key="SystemChromeBlackLowColor">#33101010</Color>
<Color x:Key="SystemChromeBlackMediumLowColor">#66101010</Color>
<Color x:Key="SystemChromeBlackMediumColor">#CC101010</Color>
<Color x:Key="SystemChromeDisabledHighColor">#FF333333</Color>
<Color x:Key="SystemChromeDisabledLowColor">#FF858585</Color>
<Color x:Key="SystemChromeHighColor">#FF767676</Color>
<Color x:Key="SystemChromeLowColor">#FF1F1F1F</Color>
<Color x:Key="SystemChromeMediumColor">#FF262626</Color>
<Color x:Key="SystemChromeMediumLowColor">#FF2B2B2B</Color>
<Color x:Key="SystemChromeWhiteColor">#FFEBEBEB</Color>
<Color x:Key="SystemListLowColor">#19EBEBEB</Color>
<Color x:Key="SystemListMediumColor">#33EBEBEB</Color>
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<SolidColorBrush x:Key="ApplicationPageBackgroundThemeBrush"
Color="#FFEBEBEB" />
<Color x:Key="SystemAltHighColor">#FFEBEBEB</Color>
<Color x:Key="SystemAltLowColor">#33EBEBEB</Color>
<Color x:Key="SystemAltMediumColor">#99EBEBEB</Color>
<Color x:Key="SystemAltMediumHighColor">#CCEBEBEB</Color>
<Color x:Key="SystemAltMediumLowColor">#66EBEBEB</Color>
<Color x:Key="SystemBaseHighColor">#FF101010</Color>
<Color x:Key="SystemBaseLowColor">#33101010</Color>
<Color x:Key="SystemBaseMediumColor">#99101010</Color>
<Color x:Key="SystemBaseMediumHighColor">#CC101010</Color>
<Color x:Key="SystemBaseMediumLowColor">#66101010</Color>
<Color x:Key="SystemChromeAltLowColor">#FF1F1F1F</Color>
<Color x:Key="SystemChromeBlackHighColor">#FF101010</Color>
<Color x:Key="SystemChromeBlackLowColor">#33101010</Color>
<Color x:Key="SystemChromeBlackMediumLowColor">#66101010</Color>
<Color x:Key="SystemChromeBlackMediumColor">#CC101010</Color>
<Color x:Key="SystemChromeDisabledHighColor">#FFCCCCCC</Color>
<Color x:Key="SystemChromeDisabledLowColor">#FF7A7A7A</Color>
<Color x:Key="SystemChromeHighColor">#FFB2B2B2</Color>
<Color x:Key="SystemChromeLowColor">#FFDDDDDD</Color>
<Color x:Key="SystemChromeMediumColor">#FFCCCCCC</Color>
<Color x:Key="SystemChromeMediumLowColor">#FFDDDDDD</Color>
<Color x:Key="SystemChromeWhiteColor">#FFEBEBEB</Color>
<Color x:Key="SystemListLowColor">#19101010</Color>
<Color x:Key="SystemListMediumColor">#33101010</Color>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

Просмотреть файл

@ -0,0 +1,19 @@
{
"dependencies": {
"Microsoft.ApplicationInsights": "1.0.0",
"Microsoft.ApplicationInsights.PersistenceChannel": "1.0.0",
"Microsoft.ApplicationInsights.WindowsApps": "1.0.0",
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}