SmartEvent<GenGridItemEventArgs> _realized;
SmartEvent<GenGridItemEventArgs> _unrealized;
SmartEvent<GenGridItemEventArgs> _longpressed;
+ SmartEvent _changed;
/// <summary>
/// Creates and initializes a new instance of the GenGrid class.
public event EventHandler<GenGridItemEventArgs> ItemLongPressed;
/// <summary>
+ /// Changed is raised when an item is added, removed, resized or moved and when the gengrid is resized or gets "horizontal" property changes.
+ /// </summary>
+ public event EventHandler Changed;
+
+ /// <summary>
/// Gets or sets the item's grid alignment along x-axis within a given gengrid widget.
/// The range is less than or equal to 1,and greater than or equal to 0.
/// By default, value is 0.5, meaning that the gengrid has its items grid placed exactly in the middle along x-axis.
_realized = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "realized", GenGridItemEventArgs.CreateFromSmartEvent);
_unrealized = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "unrealized", GenGridItemEventArgs.CreateFromSmartEvent);
_longpressed = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "longpressed", GenGridItemEventArgs.CreateFromSmartEvent);
+ _changed = new SmartEvent(this, this.RealHandle, "changed");
_selected.On += (s, e) => { if (e.Item != null) ItemSelected?.Invoke(this, e); };
_unselected.On += (s, e) => { if (e.Item != null) ItemUnselected?.Invoke(this, e); };
_realized.On += (s, e) => { if (e.Item != null) ItemRealized?.Invoke(this, e); };
_unrealized.On += (s, e) => { if (e.Item != null) ItemUnrealized?.Invoke(this, e); };
_longpressed.On += (s, e) => { if (e.Item != null) ItemLongPressed?.Invoke(this, e); };
+ _changed.On += (s, e) => { Changed?.Invoke(this, e); };
}
void AddInternal(GenGridItem item)