Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to close view on selection of CollectionView Item?

$
0
0

Hi All,

I got stuck in this , i am successfully showing collection view with some images now i have to close this view from main view on clicking of collection view item, this is my code

NSView :-

 public override void AwakeFromNib ()
 {
      base.AwakeFromNib ();
      PeopleArray.AddObserver ("selectionIndexes", NSKeyValueObservingOptions.New, (sender) => {
            RaisePersonSelected((nint)PeopleArray.SelectionIndex);
      });
 }

ViewController :-

View.PersonSelected += (index) => {
try
   {
        SelectedPerson = _people.GetItem<PersonModel>((nuint)index);
        this.View.RemoveFromSuperview();
   }
  catch {
       SelectedPerson = null;
            }
  };

after clicking on collection view item its going to await mode :( , Can anyone help me to go right direction ...


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>