예제 #1
0
        protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            base.OnElementPropertyChanged(sender, e);

            if (e.PropertyName == NativeListView.ItemsProperty.PropertyName)
            {
                // update the Items list in the UITableViewSource
                var s = new NativeListViewSource(Element);
                Control.Source = s;
            }
        }
예제 #2
0
        protected override void OnElementChanged(ElementChangedEventArgs <NativeListView> e)
        {
            base.OnElementChanged(e);

            if (e.OldElement != null)
            {
                // unsubscribe
            }

            if (e.NewElement != null)
            {
                if (Control == null)
                {
                    SetNativeControl(new UITableView());
                }
                // subscribe
                var s = new NativeListViewSource(e.NewElement);
                Control.Source = s;
            }
        }