-
-
Save BryanOroxon/dd184a2e2681fb301420ed443fda2cf8 to your computer and use it in GitHub Desktop.
CollectionMovies.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Xaml; | |
using GifInMotion.ViewModels; | |
namespace GifInMotion.Views | |
{ | |
[XamlCompilation(XamlCompilationOptions.Compile)] | |
public partial class CollectionMovies : ContentPage | |
{ | |
public MovieViewModel viewModel; | |
public CollectionMovies() | |
{ | |
InitializeComponent(); | |
BindingContext = viewModel = new MovieViewModel(); | |
if (viewModel.Movies.Count == 0) | |
{ | |
viewModel.GetMoviesCommand.Execute("Collection View"); | |
CollectionViewSource.ItemsSource = viewModel.Movies; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment