示例#1
0
 public MvxPageAdapter(IMvxEventSourcePage eventSource) : base(eventSource)
 {
     if (!(eventSource is IMvxPage))
     {
         throw new ArgumentException("eventSource", "eventSource should be a IMvxPage");
     }
 }
示例#2
0
        public MvxBasePageAdapter(IMvxEventSourcePage eventSource)
        {
            if (eventSource == null)
            {
                throw new ArgumentException("eventSource - eventSource should not be null");
            }

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

            _eventSource = eventSource;
            _eventSource.AppearingCalled             += HandleAppearingCalled;
            _eventSource.DisappearingCalled          += HandleDisappearingCalled;
            _eventSource.BindingContextChangedCalled += HandleBindingContextChangedCalled;
            _eventSource.ParentSetCalled             += HandleParentSetCalled;
        }
 public static void AdaptForBinding(this IMvxEventSourcePage page)
 {
     var adapter = new MvxPageAdapter(page);
 }