Beispiel #1
0
            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;
            }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Legend"/> class.
 /// </summary>
 public Legend()
 {
     _datasource = new LegendDataSource(this);
     Initialize();
 }
Beispiel #3
0
 /// <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();
 }
Beispiel #4
0
 /// <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();
 }
Beispiel #5
0
 public Legend(IntPtr handle)
     : base(handle)
 {
     _datasource = new LegendDataSource(this);
     Initialize();
 }