/// <summary>
/// Perform an <see cref="Action"/> on a <see cref="ToolStripItem"/>'s thread.
/// </summary>
/// <param name="control"></param>
/// <param name="action"></param>
public static void OnThread( this ToolStripItem control, Action action ) {
if ( null == control ) {
return;
}
if ( null == action ) {
return;
}
var parent = control.GetCurrentParent() as Control;
if ( null != parent ) {
parent.OnThread( action );
}
}
No comments:
Post a Comment