protected virtual void Init(WeakReference <ReactiveList> reactiveListRef) { _reactiveListRef = reactiveListRef; _reactiveListRef.TryGetTarget(out _reactiveList); _useGridAsMainRoot = !_reactiveList.UseAbsoluteLayoutInternally; if (!_useGridAsMainRoot) { _rootLayout = new AbsoluteLayout() { Padding = 0d, BackgroundColor = _reactiveList.RowBackgroundColor, }; View = _rootLayout; } else { _rootLayoutAuto = new Grid() { RowSpacing = 0d, ColumnSpacing = 0d, Padding = 0d, BackgroundColor = _reactiveList.RowBackgroundColor, }; View = _rootLayoutAuto; } _columnTemplate = _reactiveList.ColumnTemplate; _desiredColumnCount = _reactiveList.DesiredColumnCount; _columnExpand = _reactiveList.ColumnExpand; }
protected virtual DataTemplate RequestColumnTemplate() { ReactiveList reactiveList = null; DataTemplate res; if (_reactiveListRef.TryGetTarget(out reactiveList) && reactiveList != null) { res = reactiveList.ColumnTemplate; _desiredColumnCount = reactiveList.DesiredColumnCount; _columnExpand = reactiveList.ColumnExpand; } else { res = default(DataTemplate); } return(res); }