/// <summary>
        /// Initializes a new instance of the <see cref="MainPage"/> class.
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            var imageSet = new ViewModel.AppImageSet();
            this.DataContext = imageSet;
            this.swipeManager = new SwipeManager(this.ImageHolder, imageSet);

            this.Loaded += this.OnLoaded;
            this.SizeChanged += this.OnLoaded;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SwipeManager"/> class.
        /// </summary>
        /// <param name="root">The root object being swiped.</param>
        /// <param name="imageSet">The image set.</param>
        public SwipeManager(FrameworkElement root, AppImageSet imageSet)
        {
            this.Root = root;
            this.ImageSet = imageSet;

           
            this.Root.ManipulationMode = ManipulationModes.TranslateX;
            this.Root.ManipulationDelta += this.OnManipulationDelta;
            this.Root.ManipulationCompleted += this.OnManipulationCompleted;
            this.Root.KeyUp += this.OnKeyUp;
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainPage"/> class.
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            var imageSet = new ViewModel.AppImageSet();

            this.DataContext  = imageSet;
            this.swipeManager = new SwipeManager(this.ImageHolder, imageSet);

            this.Loaded      += this.OnLoaded;
            this.SizeChanged += this.OnLoaded;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainPage"/> class.
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            this.NavigationCacheMode = NavigationCacheMode.Required;
            var imageSet = new ViewModel.AppImageSet();
            this.DataContext = imageSet;
            this.swipeManager = new SwipeManager(this.PageRoot, imageSet);

            this.Loaded += this.OnLoaded;
            this.SizeChanged += (s, e) => this.OnLoaded(s, e);

            imageSet.App.DropboxClientChanged += this.OnDropboxClientChanged;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainPage"/> class.
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            this.NavigationCacheMode = NavigationCacheMode.Required;
            var imageSet = new ViewModel.AppImageSet();

            this.DataContext  = imageSet;
            this.swipeManager = new SwipeManager(this.PageRoot, imageSet);

            this.Loaded      += this.OnLoaded;
            this.SizeChanged += (s, e) => this.OnLoaded(s, e);

            imageSet.App.DropboxClientChanged += this.OnDropboxClientChanged;
        }