This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Common; | |
using SimpleMVVM.Models; | |
using SimpleMVVM.ViewModels; | |
using Windows.UI.Xaml.Controls; | |
using Windows.UI.Xaml.Navigation; | |
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 | |
namespace SimpleMVVM | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page | |
x:Class="SimpleMVVM.MovieDetailView" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:SimpleMVVM" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
HorizontalAlignment="Left" | |
DataContext="{Binding Source={StaticResource ViewModelLocator}, Path=MovieDetailViewModel}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static NavigationService NavigationService; | |
/// <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) | |
{ | |
Frame rootFrame = Window.Current.Content as Frame; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using SimpleMVVM.Data; | |
using SimpleMVVM.Models; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Input; | |
namespace SimpleMVVM.ViewModels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using SimpleMVVM.Data; | |
using System.Collections.Generic; | |
namespace SimpleMVVM.ViewModels | |
{ | |
public class ViewModelLocator | |
{ | |
private Dictionary<string, ViewModelBase> modSet; | |
private FakeDatabase dbContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page | |
x:Class="SimpleMVVM.MovieDetailView" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:SimpleMVVM" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
HorizontalAlignment="Left" | |
DataContext="{Binding Source={StaticResource ViewModelLocator}, Path=MovieDetailViewModel}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Common; | |
using SimpleMVVM.Models; | |
using SimpleMVVM.ViewModels; | |
using Windows.UI.Xaml.Controls; | |
using Windows.UI.Xaml.Navigation; | |
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 | |
namespace SimpleMVVM | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void selectedMovieChanged() | |
{ | |
if(SelectedMovie !=null) | |
App.NavigationService.Navigate<MovieDetailView>(SelectedMovie); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Common; | |
using SimpleMVVM.ViewModels; | |
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page | |
x:Class="SimpleMVVM.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:SimpleMVVM" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
DataContext="{Binding Source= {StaticResource ViewModelLocator}, Path=MovieListViewModel}" | |
> |