public void SetElement(VisualElement element)
        {
            var oldElement = Element;

            Element = element;

            ViewControllers = new[] { _masterController = new EventedViewController(), _detailController = new ChildViewController() };

            Delegate = _innerDelegate = new InnerDelegate(MasterDetailPage.MasterBehavior);

            UpdateControllers();

            _masterController.WillAppear    += MasterControllerWillAppear;
            _masterController.WillDisappear += MasterControllerWillDisappear;

            PresentsWithGesture = MasterDetailPage.IsGestureEnabled;

            OnElementChanged(new VisualElementChangedEventArgs(oldElement, element));

            EffectUtilities.RegisterEffectControlProvider(this, oldElement, element);

            if (element != null)
            {
                element.SendViewInitialized(NativeView);
            }
        }
示例#2
0
        public void SetElement(VisualElement element)
        {
            var oldElement = Element;

            Element = element;

            ViewControllers = new[] { _flyoutController = new EventedViewController(), _detailController = new ChildViewController() };

            if (!Forms.IsiOS9OrNewer)
            {
                Delegate = _innerDelegate = new InnerDelegate(FlyoutPage.FlyoutLayoutBehavior);
            }

            UpdateControllers();

            _flyoutController.DidAppear     += FlyoutControllerDidAppear;
            _flyoutController.WillDisappear += FlyoutControllerWillDisappear;

            PresentsWithGesture = FlyoutPage.IsGestureEnabled;
            OnElementChanged(new VisualElementChangedEventArgs(oldElement, element));

            EffectUtilities.RegisterEffectControlProvider(this, oldElement, element);

            if (element != null)
            {
                element.SendViewInitialized(NativeView);
            }
        }
		public void SetElement(VisualElement element)
		{
			var oldElement = Element;
			Element = element;

			ViewControllers = new[] { _masterController = new EventedViewController(), _detailController = new ChildViewController() };

			Delegate = _innerDelegate = new InnerDelegate(MasterDetailPage.MasterBehavior);

			UpdateControllers();

			_masterController.WillAppear += MasterControllerWillAppear;
			_masterController.WillDisappear += MasterControllerWillDisappear;

			PresentsWithGesture = MasterDetailPage.IsGestureEnabled;

			OnElementChanged(new VisualElementChangedEventArgs(oldElement, element));

			EffectUtilities.RegisterEffectControlProvider(this, oldElement, element);

			if (element != null)
				element.SendViewInitialized(NativeView);
		}