示例#1
0
        public void Start()
        {
            _chosenIndex = TabListControl.ChosenIndex.Value ?? 0;

            TabListControl.ChosenIndex
            .WhereNotNull()
            .LazyThrottle(TimeSpan.FromSeconds(SelectionDelay))
            .DistinctUntilChanged()
            .SelectMany(x => ShowContent(x ?? 0))
            .Subscribe(x => _contentView.Value = x)
            .AddTo(this);

            _navigationHandler.BindBidirectional(
                ContentTransitionControl,
                TabListControl,
                (MoveDirection)TabPlacement,
                () => _chosenIndex == TabListControl.ChosenIndex.Value && MutableState.Value != PresenterState.Presenting &&
                ContentTransitionControl.FirstView.Value != null);

            _navigationHandler.BindCancel(
                ContentTransitionControl,
                TabListControl);
        }