public TabsControl()
        {
            InitializeComponent();
            _swipeContainer        = new SwipeContainer();
            _swipeContainer.Swipe += TabContent_Swiped;
            Root.Children.Add(_swipeContainer);
            Grid.SetRow(_swipeContainer, 1);

            _tabItemTappedGestureRecognizer         = new TapGestureRecognizer();
            _tabItemTappedGestureRecognizer.Tapped += OnTabItemTapped;

            TabsRepeater.SizeChanged += TabsRepeater_SizeChanged;
            this.PropertyChanged     += new PropertyChangedEventHandler(BindableOnPropertyChanged);
        }
Exemple #2
0
        public SwipeContainer GetSwipeContainer()
        {
            SwipeContainer result = null;
            var            parent = this.Parent;

            while (parent != null)
            {
                var x = parent as SwipeContainer;
                if (x != null)
                {
                    result = x;
                    break;
                }
                else
                {
                    parent = parent.Parent;
                }
            }
            return(result);
        }