Ejemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _containerArea = new UIView();
            if (Forms.IsiOS11OrNewer)
            {
                _containerArea.InsetsLayoutMarginsFromSafeArea = false;
            }

            View.AddSubview(_containerArea);

            LoadRenderers();

            ShellSection.PropertyChanged += OnShellSectionPropertyChanged;
            ((INotifyCollectionChanged)ShellSection.Items).CollectionChanged += OnShellSectionItemsChanged;

            _blurView = new UIView();
            UIVisualEffect blurEffect = UIBlurEffect.FromStyle(UIBlurEffectStyle.ExtraLight);

            _blurView = new UIVisualEffectView(blurEffect);

            View.AddSubview(_blurView);

            UpdateHeaderVisibility();

            var tracker = _shellContext.CreatePageRendererTracker();

            tracker.IsRootPage     = true;
            tracker.ViewController = this;
            tracker.Page           = ((IShellContentController)ShellSection.CurrentItem).GetOrCreateContent();
            _tracker = tracker;
        }
Ejemplo n.º 2
0
        public void Show()
        {
            var            controller = GetUIController();
            UIVisualEffect blurEffect = UIBlurEffect.FromStyle(UIBlurEffectStyle.Regular);

            visualEffectView       = new UIVisualEffectView(blurEffect);
            visualEffectView.Frame = controller.View.Bounds;
            controller.View.AddSubview(visualEffectView);
        }
        UIVisualEffectView GetBlurView()
        {
            UIVisualEffect     blurEffect       = UIBlurEffect.FromStyle(UIBlurEffectStyle.Prominent);
            var                window           = UIApplication.SharedApplication.KeyWindow;
            UIVisualEffectView visualEffectView = new UIVisualEffectView(blurEffect);

            visualEffectView.Frame = window.RootViewController.View.Bounds;
            return(visualEffectView);
        }
Ejemplo n.º 4
0
        private UIVisualEffectView SetupLayer()
        {
            UIVisualEffect blurEffect = UIBlurEffect.FromStyle(ChooseBlurAmount(this.Element.BlurAmount));

            _visualEffectView = new UIVisualEffectView(blurEffect)
            {
                Frame = this.Frame
            };
            return(_visualEffectView);
        }
        private void UpdateEffectView(UIVisualEffect effect)
        {
            if (this.blurView != null)
            {
                this.blurView.RemoveFromSuperview();
            }

            this.blurView       = new UIVisualEffectView(effect);
            this.blurView.Frame = this.View.Frame;
            this.blurView.UserInteractionEnabled = false;
            this.View.Add(this.blurView);
        }
Ejemplo n.º 6
0
        public override void ViewDidLoad()
        {
            if (_isDisposed)
            {
                return;
            }

            if (ShellSection.CurrentItem == null)
            {
                throw new InvalidOperationException($"Content not found for active {ShellSection}. Title: {ShellSection.Title}. Route: {ShellSection.Route}.");
            }

            base.ViewDidLoad();

            _containerArea = new UIView();
            if (Forms.IsiOS11OrNewer)
            {
                _containerArea.InsetsLayoutMarginsFromSafeArea = false;
            }

            View.AddSubview(_containerArea);

            LoadRenderers();

            ShellSection.PropertyChanged += OnShellSectionPropertyChanged;
            ShellSectionController.ItemsCollectionChanged += OnShellSectionItemsChanged;

            _blurView = new UIView();
            UIVisualEffect blurEffect = UIBlurEffect.FromStyle(UIBlurEffectStyle.ExtraLight);

            _blurView = new UIVisualEffectView(blurEffect);

            View.AddSubview(_blurView);

            UpdateHeaderVisibility();

            var tracker = _shellContext.CreatePageRendererTracker();

            tracker.IsRootPage     = true;
            tracker.ViewController = this;

            if (ShellSection.CurrentItem != null)
            {
                tracker.Page = ((IShellContentController)ShellSection.CurrentItem).GetOrCreateContent();
            }
            _tracker = tracker;
            UpdateFlowDirection();
        }
Ejemplo n.º 7
0
        public async override void ViewDidLoad()
        {
            base.ViewDidLoad();

            PlayButton.SetBackgroundImage(UIImage.FromFile("images/play.png"), UIControlState.Normal);
            PlayButton.SetBackgroundImage(UIImage.FromFile("images/play_black.png"), UIControlState.Focused);

            PreviousButton.SetBackgroundImage(UIImage.FromFile("images/previous.png"), UIControlState.Normal);
            PreviousButton.SetBackgroundImage(UIImage.FromFile("images/previous_black.png"), UIControlState.Focused);

            NextButton.SetBackgroundImage(UIImage.FromFile("images/next.png"), UIControlState.Normal);
            NextButton.SetBackgroundImage(UIImage.FromFile("images/next_black.png"), UIControlState.Focused);

            PlayButton.AdjustsImageWhenHighlighted     = true;
            PreviousButton.AdjustsImageWhenHighlighted = true;
            NextButton.AdjustsImageWhenHighlighted     = true;

            PlayButton.AdjustsImageWhenDisabled     = true;
            PreviousButton.AdjustsImageWhenDisabled = true;
            NextButton.AdjustsImageWhenDisabled     = true;

            PlayButton.Enabled     = false;
            PreviousButton.Enabled = false;
            NextButton.Enabled     = false;

            PlayButton.PrimaryActionTriggered     += PlayButton_PrimaryActionTriggered;
            PreviousButton.PrimaryActionTriggered += PreviousButton_PrimaryActionTriggered;
            NextButton.PrimaryActionTriggered     += NextButton_PrimaryActionTriggered;

            UIVisualEffect     blurEffect       = UIBlurEffect.FromStyle(UIBlurEffectStyle.Light);
            UIVisualEffectView visualEffectView = new UIVisualEffectView(blurEffect);

            visualEffectView.Frame = new CoreGraphics.CGRect(0, -100, 1920, 1200);
            BackgroundImage.AddSubview(visualEffectView);

            CloudService.Instance.Init(new User()
            {
                TwitterId = "fakeId",
                Name      = "Fake user"
            });
            CloudService.Instance.Connected += Instance_Connected;

            DataService.Instance.Dispatcher = new DispatcherWrapper(this);
        }
        private void UpdateEffectView(UIVisualEffect effect)
        {
            if (this.blurView != null) {
                this.blurView.RemoveFromSuperview ();
            }

            this.blurView = new UIVisualEffectView (effect);
            this.blurView.Frame = this.View.Frame;
            this.blurView.UserInteractionEnabled = false;
            this.View.Add (this.blurView);
        }