Ejemplo n.º 1
0
 public MvxElementAdapter(IMvxEventSourceElement eventSource) : base(eventSource)
 {
     if (!(eventSource is IMvxElement))
     {
         throw new ArgumentException("eventSource", "eventSource should be a IMvxElement");
     }
 }
Ejemplo n.º 2
0
        public MvxBaseElementAdapter(IMvxEventSourceElement eventSource)
        {
            if (eventSource == null)
            {
                throw new ArgumentException("eventSource - eventSource should not be null");
            }

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

            _eventSource = eventSource;
            _eventSource.BindingContextChangedCalled += HandleBindingContextChangedCalled;
            _eventSource.ParentSetCalled             += HandleParentSetCalled;
        }
 public static void AdaptForBinding(this IMvxEventSourceElement element)
 {
     var adapter = new MvxElementAdapter(element);
 }