public MvxElementAdapter(IMvxEventSourceElement eventSource) : base(eventSource) { if (!(eventSource is IMvxElement)) { throw new ArgumentException("eventSource", "eventSource should be a IMvxElement"); } }
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); }