コード例 #1
0
ファイル: GridView.Legacy.iOS.cs プロジェクト: jokm1/uno-2
        protected override void OnSourceChanged(ListViewBaseSource oldSource, ListViewBaseSource newSource)
        {
            base.OnSourceChanged(oldSource, newSource);

            var asGridViewSource = newSource as GridViewSource;

            if (asGridViewSource != null)
            {
                Layout.Source = new WeakReference <ListViewBaseSource>(asGridViewSource);
            }
        }
コード例 #2
0
        protected virtual void OnSourceChanged(ListViewBaseSource oldSource, ListViewBaseSource newSource)
        {
            if (oldSource != null)
            {
                oldSource.SelectionChanged -= OnRouteSelectionChanged;
            }

            if (newSource != null)
            {
                newSource.Items             = ItemsSource as IEnumerable;
                newSource.ItemClickCommand  = Command;
                newSource.SelectionMode     = SelectionMode;
                newSource.SelectionChanged += OnRouteSelectionChanged;
                newSource.ItemClick        += (s2, e) => ItemClick?.Invoke(s2, e);
            }
        }