Ejemplo n.º 1
0
        public PaginationControl()
        {
            InitializeComponent();

            NavPanel.Height = NAVIGATION_PANEL_MINIMUM_HEIGHT;

            BackwardButton.Barcode = BackwardButton.RegisterControl((s) => { });
            ForwardButton.Barcode  = ForwardButton.RegisterControl((s) => { });
            CloseButton.Barcode    = CloseButton.RegisterControl((s) => { });
        }
        void ReleaseDesignerOutlets()
        {
            if (BackwardButton != null)
            {
                BackwardButton.Dispose();
                BackwardButton = null;
            }

            if (BackwardButtonCenterYConstraint != null)
            {
                BackwardButtonCenterYConstraint.Dispose();
                BackwardButtonCenterYConstraint = null;
            }

            if (ContainerView != null)
            {
                ContainerView.Dispose();
                ContainerView = null;
            }

            if (ForwardButton != null)
            {
                ForwardButton.Dispose();
                ForwardButton = null;
            }

            if (HoppOverButton != null)
            {
                HoppOverButton.Dispose();
                HoppOverButton = null;
            }

            if (PageControl != null)
            {
                PageControl.Dispose();
                PageControl = null;
            }
        }
Ejemplo n.º 3
0
        async Task Initialize()
        {
            PivotSize = LemuriaPivot.Items.Count;
            // load a jpeg, be sure to have the Pictures Library capability in your manifest
            var folder = await Package.Current.InstalledLocation.GetFolderAsync(@"Assets");

            var file = await folder.GetFileAsync("Background.jpg");

            using (var data = await file.OpenAsync(FileAccessMode.Read))
            {
                BitmapImage bitmapImage = new BitmapImage();
                await bitmapImage.SetSourceAsync(data);

                LemuriaPivot.Background = new ImageBrush {
                    ImageSource = bitmapImage, Stretch = Stretch.UniformToFill
                };
                // Ensure image loaded
                await Task.Delay(500);
            }

            // Notifiers
            notifiers.PropertyChanged += Notifiers_PropertyChanged;
            // Forward
            ForwardButton.AddHandler(PointerPressedEvent, new PointerEventHandler(MoveForward_PointerPressed), true);
            ForwardButton.AddHandler(PointerReleasedEvent, new PointerEventHandler(MoveForward_PointerReleased), true);
            // Backward
            BackwardButton.AddHandler(PointerPressedEvent, new PointerEventHandler(MoveBackward_PointerPressed), true);
            BackwardButton.AddHandler(PointerReleasedEvent, new PointerEventHandler(MoveBackward_PointerReleased), true);
            // Left
            LeftButoon.AddHandler(PointerPressedEvent, new PointerEventHandler(TurnLeft_PointerPressed), true);
            LeftButoon.AddHandler(PointerReleasedEvent, new PointerEventHandler(TurnLeft_PointerReleased), true);
            // Right
            RightButton.AddHandler(PointerPressedEvent, new PointerEventHandler(TurnRight_PointerPressed), true);
            RightButton.AddHandler(PointerReleasedEvent, new PointerEventHandler(TurnRight_PointerReleased), true);

            SelectPage("connect");
        }