示例#1
0
        protected override object OnGetCustomItem(ICustomItem item, iLayer layer, IListView view, object recycledCell)
        {
            var cell = GetNativeObject <FrameworkElement>(Converter.ConvertToCell(item, layer.LayerStyle, view, null), "item", true);

            if (CustomItemRequested != null)
            {
                return(CustomItemRequested(item, layer));
            }
            return(cell);
        }
示例#2
0
        protected override object OnGetCustomItem(ICustomItem item, iLayer layer, IListView view, object recycledCell)
        {
            if (CustomItemRequested == null)
            {
                return(base.OnGetCustomItem(item, layer, view, recycledCell));
            }
            var custom = recycledCell as CustomItemContainer;

            return(CustomItemRequested(item, custom?.CustomItem as View, layer));
        }
示例#3
0
        protected override object OnGetCustomItem(ICustomItem item, iLayer layer, IListView view, object recycledCell)
        {
            var controller = GetNativeObject <UIViewController>(view, "view") as UITableViewController;
            var cell       = GetNativeObject <UITableViewCell>(Converter.ConvertToCell(item, layer.LayerStyle, view, null), "item");

            if (CustomItemRequested != null)
            {
                return(CustomItemRequested(item, cell, controller == null ? null : controller.TableView));
            }

            return(cell);
        }
示例#4
0
        protected override object OnGetCustomItem(ICustomItem item, iLayer layer, IListView view, object recycledCell)
        {
            var ci = GetCustomItem;

            if (ci != null)
            {
                return(ci(item, layer, view, recycledCell as Control));
            }
#pragma warning disable 618
            var cir = CustomItemRequested;
            return(cir == null ? null : cir(item, layer.LayerStyle));

#pragma warning restore 618
        }
示例#5
0
 /// <summary>
 /// Removes the first occurrence of a specific <see cref="Condition"/> from the filter.
 /// </summary>
 /// <param name="item"></param>
 public void Remove(ICustomItem <Filter> item)
 {
     Items.Remove(item);
 }
示例#6
0
 /// <summary>
 /// Adds a <see cref="ICustomItem{T}"/> to the end of the filter.
 /// </summary>
 /// <param name="item"></param>
 public void Add(ICustomItem <Filter> item)
 {
     Items.Add(item);
 }
示例#7
0
 /// <summary>
 /// Removes the first occurrence of a specific object from the target.
 /// </summary>
 /// <param name="item"></param>
 public void Remove(ICustomItem <Target> item)
 {
     Items.Remove(item);
 }
示例#8
0
 /// <summary>
 /// Adds a object to the end of the target.
 /// </summary>
 /// <param name="item"></param>
 public void Add(ICustomItem <Target> item)
 {
     Items.Add(item);
 }
示例#9
0
 /// <summary>
 /// Adds a <see cref="ICustomItem{T}"/> to the end of the filter.
 /// </summary>
 /// <param name="item"></param>
 public Filter Add(ICustomItem <Filter> item)
 {
     Items.Add(item);
     return(this);
 }
示例#10
0
 /// <summary>
 /// Removes the first occurrence of a specific <see cref="Condition"/> from the filter.
 /// </summary>
 /// <param name="item"></param>
 public Filter Remove(ICustomItem <Filter> item)
 {
     Items.Remove(item);
     return(this);
 }
示例#11
0
 /// <summary>
 /// Called when an <see cref="ICustomItem"/> instance is ready to be rendered and a native object is needed for insertion into the view.
 /// </summary>
 /// <param name="item">The item that is ready to be rendered.</param>
 /// <param name="layer">The layer instance associated with the item, or <c>null</c> if the item is not associated with a layer.</param>
 /// <param name="view">The view that will contain the item.</param>
 /// <param name="recycledCell">An already instantiated cell that is ready for reuse, or <c>null</c> if no cell has been recycled.</param>
 /// <returns>The object that will be inserted into the view.</returns>
 protected internal virtual object OnGetCustomItem(ICustomItem item, iLayer layer, IListView view, object recycledCell)
 {
     return(Converter.ConvertToCell(item, layer.LayerStyle, view, recycledCell as ICell));
 }
示例#12
0
 /// <summary>
 /// Removes the first occurrence of a specific object from the target.
 /// </summary>
 /// <param name="item"></param>
 public Target Remove(ICustomItem <Target> item)
 {
     Items.Remove(item);
     return(this);
 }
示例#13
0
 /// <summary>
 /// Adds a object to the end of the target.
 /// </summary>
 /// <param name="item"></param>
 public Target Add(ICustomItem <Target> item)
 {
     Items.Add(item);
     return(this);
 }