12345678910111213141516171819202122232425262728293031 |
- using System.ComponentModel;
- namespace System.Windows.Forms
- {
- public sealed class LayoutEventArgs : EventArgs
- {
- private readonly IComponent affectedComponent;
- private readonly string affectedProperty;
- public IComponent AffectedComponent => affectedComponent;
- public Control AffectedControl => affectedComponent as Control;
- public string AffectedProperty => affectedProperty;
- public LayoutEventArgs(IComponent affectedComponent, string affectedProperty)
- {
- this.affectedComponent = affectedComponent;
- this.affectedProperty = affectedProperty;
- }
- public LayoutEventArgs(Control affectedControl, string affectedProperty)
- : this((IComponent)affectedControl, affectedProperty)
- {
- }
- }
- public delegate void LayoutEventHandler(object sender, LayoutEventArgs e);
- }
|