aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcinzelent <marcin@zelent.net>2017-02-04 17:46:03 +0100
committermarcinzelent <marcin@zelent.net>2017-02-04 17:46:03 +0100
commit1d65134c461d6648b5556847565d37f898db5ad0 (patch)
treed9ecabc0fb0d2e79ac57f176e152dfcb5802178c /France_Vacances/France_Vacances/View/AccommodationView.xaml.cs
parentffbe744e0807d0d70d31220fece2a034e56509cf (diff)
Repo copy.
Diffstat (limited to 'France_Vacances/France_Vacances/View/AccommodationView.xaml.cs')
-rw-r--r--France_Vacances/France_Vacances/View/AccommodationView.xaml.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/France_Vacances/France_Vacances/View/AccommodationView.xaml.cs b/France_Vacances/France_Vacances/View/AccommodationView.xaml.cs
new file mode 100644
index 0000000..7207783
--- /dev/null
+++ b/France_Vacances/France_Vacances/View/AccommodationView.xaml.cs
@@ -0,0 +1,51 @@
+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 France_Vacances.View
+{
+ /// <summary>
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ /// </summary>
+ public sealed partial class AccommodationView : Page
+ {
+ private int i=0;
+ public AccommodationView()
+ {
+ this.InitializeComponent();
+ }
+
+ private void GoToBookingView(object sender, RoutedEventArgs e)
+ {
+ Frame.Navigate(typeof(BookingView));
+ }
+
+ private void PreviousImage(object sender, RoutedEventArgs e)
+ {
+ if(i!=0) i--;
+ Binding myBinding = new Binding();
+ myBinding.Path = new PropertyPath("DisplayedAccommodationModel.Images" + "[" + i + "]");
+ BindingOperations.SetBinding(ImageViewerBackground, ImageBrush.ImageSourceProperty, myBinding);
+ }
+ private void NextImage(object sender, RoutedEventArgs e)
+ {
+ if(i!=4)i++;
+ Binding myBinding = new Binding();
+ myBinding.Path = new PropertyPath("DisplayedAccommodationModel.Images" + "[" + i + "]");
+ BindingOperations.SetBinding(ImageViewerBackground,ImageBrush.ImageSourceProperty,myBinding);
+ }
+ }
+}