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

            Element = element;

            Init();

            RaiseElementChanged(new VisualElementChangedEventArgs(oldElement, element));

            EffectUtilities.RegisterEffectControlProvider(this, oldElement, element);
        }
Пример #2
0
        public void SetElement(VisualElement element)
        {
            var oldElement = Element;

            Element = element;

            UpdateControllers();

            HandleElementChanged(new VisualElementChangedEventArgs(oldElement, element));

            EffectUtilities.RegisterEffectControlProvider(this, oldElement, element);
        }
Пример #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);
        }
Пример #4
0
        public void SetElement(VisualElement element)
        {
            var oldElement = Element;

            Element = element;

            if (oldElement != null)
            {
                oldElement.PropertyChanged -= OnPropertyChanged;
                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();
                }
            }

            OnElementChanged(new VisualElementChangedEventArgs(oldElement, element));

            ConfigureTabView();

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

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

            UpdateBarBackgroundColor();

            UpdateBarTextColor();

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