Skip to content

Instantly share code, notes, and snippets.

@ChrisMoney
Created September 28, 2016 20:20
Show Gist options
  • Save ChrisMoney/4e4325d45106326a598017c3169a7dfd to your computer and use it in GitHub Desktop.
Save ChrisMoney/4e4325d45106326a598017c3169a7dfd to your computer and use it in GitHub Desktop.
MainWindow - Replaced Window property with Page property so app can be a navigation app. NavigationWindow uses this page as it's source.
using System.Windows.Navigation;
namespace RegistrationKiosk
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Page
{
public MainWindow()
{
InitializeComponent();
}
private void MainWindow_OnMouseDown(object sender, MouseButtonEventArgs e)
{
NavigationService nav = NavigationService.GetNavigationService(this);
nav.Navigate(new Uri("CardSwipe.xaml", UriKind.RelativeOrAbsolute));
}
}
}
<Page x:Class="RegistrationKiosk.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="{Binding SystemParameters.PrimaryScreenHeight }"
Width="{Binding SystemParameters.PrimaryScreenWidth}"
MouseDown="MainWindow_OnMouseDown"
>
<Grid Name="MainWindowFrame">
<Grid.Background>
<ImageBrush ImageSource="Images/attract.gif" >
</ImageBrush>
</Grid.Background>
</Grid>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment