public LegendTableSource(LegendDataSource legends) : base() { _legends = legends; var incc = _legends as INotifyCollectionChanged; var listener = new Internal.WeakEventListener <INotifyCollectionChanged, object, NotifyCollectionChangedEventArgs>(incc) { OnEventAction = (instance, source, eventArgs) => { CollectionChanged?.Invoke(this, eventArgs); }, OnDetachAction = (instance, weakEventListener) => instance.CollectionChanged -= weakEventListener.OnEvent }; incc.CollectionChanged += listener.OnEvent; }
/// <summary> /// Initializes a new instance of the <see cref="Legend"/> class. /// </summary> public Legend() { _datasource = new LegendDataSource(this); Initialize(); }
/// <summary> /// Initializes a new instance of the <see cref="Legend"/> class. /// </summary> /// <param name="context">The Context the view is running in, through which it can access resources, themes, etc</param> /// <param name="attr">The attributes of the AXML element declaring the view</param> public Legend(Context context, IAttributeSet attr) : base(context, attr) { _datasource = new LegendDataSource(this); Initialize(); }
/// <summary> /// Initializes a new instance of the <see cref="Legend"/> class. /// </summary> /// <param name="context">The Context the view is running in, through which it can access resources, themes, etc</param> public Legend(Context context) : base(context) { _datasource = new LegendDataSource(this); Initialize(); }
public Legend(IntPtr handle) : base(handle) { _datasource = new LegendDataSource(this); Initialize(); }