Exemplo n.º 1
0
 public MvxCellAdapter(IMvxEventSourceCell eventSource) : base(eventSource)
 {
     if (!(eventSource is IMvxCell))
     {
         throw new ArgumentException("eventSource", "eventSource should be a IMvxCell");
     }
 }
Exemplo n.º 2
0
        public MvxBaseCellAdapter(IMvxEventSourceCell eventSource)
        {
            if (eventSource == null)
            {
                throw new ArgumentException("eventSource - eventSource should not be null");
            }

            if (!(eventSource is Cell))
            {
                throw new ArgumentException("eventSource - eventSource should be a Cell");
            }

            _eventSource = eventSource;
            _eventSource.AppearingCalled             += HandleAppearingCalled;
            _eventSource.DisappearingCalled          += HandleDisappearingCalled;
            _eventSource.TappedCalled                += HandleTappedCalled;
            _eventSource.BindingContextChangedCalled += HandleBindingContextChangedCalled;
            _eventSource.ParentSetCalled             += HandleParentSetCalled;
        }
 public static void AdaptForBinding(this IMvxEventSourceCell cell)
 {
     var adapter = new MvxCellAdapter(cell);
 }