colView.OnSelectionChanged(args);
}
- private static object CoerceSelectedItems(BindableObject bindable, object value)
+ private static object CoerceSelectedItems(CollectionView colView, object value)
{
- var colView = bindable as CollectionView;
if (value == null)
{
return new SelectionList(colView);
return new SelectionList(colView, value as IList<object>);
}
- private static void SelectionModePropertyChanged(BindableObject bindable, object oldValue, object newValue)
+ private static void SelectionModePropertyChanged(CollectionView colView, object oldValue, object newValue)
{
- var colView = bindable as CollectionView;
-
var oldMode = (ItemSelectionMode)oldValue;
var newMode = (ItemSelectionMode)newValue;
if (groupHeader == null)
{
- groupHeader = (RecyclerViewItem)DataTemplateExtensions.CreateContent(groupHeaderTemplate, context, this);
+ groupHeader = DataTemplateExtensions.CreateContent(groupHeaderTemplate, context, this) as RecyclerViewItem;
+ if (groupHeader == null)
+ {
+ return null;
+ }
groupHeader.Template = templ;
groupHeader.isGroupHeader = true;
if (groupFooter == null)
{
groupFooter = DataTemplateExtensions.CreateContent(groupFooterTemplate, context, this) as RecyclerViewItem;
+ if (groupFooter == null)
+ {
+ return null;
+ }
groupFooter.Template = templ;
groupFooter.isGroupHeader = false;