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

            Element = element;

            Init();

            RaiseElementChanged(new VisualElementChangedEventArgs(oldElement, element));

            EffectUtilities.RegisterEffectControlProvider(this, oldElement, element);
        }
Beispiel #2
0
        public void SetElement(VisualElement element)
        {
            var oldElement = Element;

            Element = element;

            UpdateControllers();

            HandleElementChanged(new VisualElementChangedEventArgs(oldElement, element));

            EffectUtilities.RegisterEffectControlProvider(this, oldElement, element);
        }
Beispiel #3
0
        public void SetElement(VisualElement element)
        {
            VisualElement oldElement = Element;

            Element = element;
            UpdateTitle();

            RaiseElementChanged(new VisualElementChangedEventArgs(oldElement, element));

            if (Element != null && !string.IsNullOrEmpty(Element.AutomationId))
            {
                SetAutomationId(Element.AutomationId);
            }

            EffectUtilities.RegisterEffectControlProvider(this, oldElement, element);
        }
Beispiel #4
0
        public void SetElement(VisualElement element)
        {
            var oldElement = Element;

            Element = element;

            if (oldElement != null)
            {
                oldElement.PropertyChanged -= OnElementPropertyChanged;
                var tabbedPage = oldElement as TabbedPage;
                if (tabbedPage != null)
                {
                    tabbedPage.PagesChanged -= OnPagesChanged;
                }
            }

            if (element != null)
            {
                if (_tracker == null)
                {
                    _tracker = new VisualElementTracker(this);
                    _tracker.NativeControlUpdated += (sender, e) => UpdateNativeWidget();
                }
            }

            RaiseElementChanged(new VisualElementChangedEventArgs(oldElement, element));

            ConfigureTabView();

            OnPagesChanged(null, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));

            Tabbed.PropertyChanged += OnElementPropertyChanged;
            Tabbed.PagesChanged    += OnPagesChanged;

            UpdateBarBackgroundColor();

            UpdateBarTextColor();

            EffectUtilities.RegisterEffectControlProvider(this, oldElement, element);
        }