0
votes

I am using an MVVMCross model view.

In my binding I am trying to bind my SHowBridgeCommand to the selected item in the Added UITableView ( not a UIViewController), so I can navigate to the next UIViewController.

In my Bridge.Touch View:

            var source = new MvxStandardTableViewSource(TableView, "TitleText Description;ImageUrl ImageUrl");

        TableView.RowHeight = 100;
        TableView.Source = source;

        this.DelayBind(() => {
            var set = this.CreateBindingSet<CityListView, CityListViewModel>();
            set.Bind(source).To(vm => vm.Cities);
            set.Bind(TableView).For(s => s.IsSelected).To(vm => vm.IsSelected);
            set.Apply();
        });

And my actual ViewModel in Bridge.Core I have this property, But I doubt it's necessary

        public bool IsSelected
    {
        get{ return _isSelected; }
        set {
            _isSelected = value; 
            RaisePropertyChanged(() => IsSelected);
        }
    }
1
Thanks Stuart! I used the SelectedCommand to bind to. What's strange with the code above is that it kept telling me I was binding to a string. I am posting the changed code in as the answer to close this. - Nick Turner

1 Answers

1
votes

Code change for the binding

set.Bind(source).For(s => s.SelectionChangedCommand).To (vm => vm.ShowBridgeCommand);