public override Navigator GetChildNavigatorWithContent(object content) { _album.VerifyAccess(); var photo = content as FacebookPhoto; if (photo == null) { return(null); } for (int index = 0; index < _album.Photos.Count; ++index) { if (_album.Photos[index].Equals(photo)) { var navigator = new PhotoNavigator(_album.Photos[index], this) { ParentIndex = index, }; return(navigator); } } return(null); }
protected override Navigator GetChildNavigatorWithGuid(FacebookObjectId guid) { Verify.IsTrue(FacebookObjectId.IsValid(guid), "Invalid guid"); _album.VerifyAccess(); for (int index = 0; index < _album.Photos.Count; ++index) { if (_album.Photos[index].PhotoId == guid) { var navigator = new PhotoNavigator(_album.Photos[index], this) { ParentIndex = index, }; return(navigator); } } return(null); }