EventArgs 类
TOC
折叠目录
展开目录
本文由机器翻译。若要查看英语原文,请勾选“英语”复选框。 也可将鼠标指针移到文本上,在弹出窗口中显示英语原文。
翻译
英语

EventArgs 类

 

表示包含事件数据的类的基类,并提供要用于不包含事件数据的事件的值。

命名空间:   System
程序集:  mscorlib(mscorlib.dll 中)

System.Object
System.EventArgs
Microsoft.Build.Evaluation.ProjectChangedEventArgs
Microsoft.Build.Evaluation.ProjectCollection.ProjectAddedToProjectCollectionEventArgs
Microsoft.Build.Evaluation.ProjectCollectionChangedEventArgs
Microsoft.Build.Evaluation.ProjectXmlChangedEventArgs
Microsoft.Build.Framework.BuildEventArgs
Microsoft.VisualBasic.ApplicationServices.StartupNextInstanceEventArgs
Microsoft.VisualBasic.Devices.NetworkAvailableEventArgs
Microsoft.Win32.PowerModeChangedEventArgs
Microsoft.Win32.SessionEndedEventArgs
Microsoft.Win32.SessionEndingEventArgs
Microsoft.Win32.SessionSwitchEventArgs
Microsoft.Win32.TimerElapsedEventArgs
Microsoft.Win32.UserPreferenceChangedEventArgs
Microsoft.Win32.UserPreferenceChangingEventArgs
System.Activities.Core.Presentation.LocationChangedEventArgs
System.Activities.Debugger.SourceLocationFoundEventArgs
System.Activities.Presentation.Model.EditingScopeEventArgs
System.Activities.Presentation.PropertyEditing.PropertyFilterAppliedEventArgs
System.Activities.Presentation.PropertyEditing.PropertyValueExceptionEventArgs
System.Activities.Presentation.Services.ModelChangedEventArgs
System.Activities.Presentation.SourceLocationUpdatedEventArgs
System.Activities.Presentation.UndoUnitEventArgs
System.Activities.Presentation.View.ViewCreatedEventArgs
System.Activities.Presentation.View.ViewStateChangedEventArgs
System.Activities.WorkflowApplicationEventArgs
System.AssemblyLoadEventArgs
System.Collections.Specialized.NotifyCollectionChangedEventArgs
System.ComponentModel.AddingNewEventArgs
System.ComponentModel.AsyncCompletedEventArgs
System.ComponentModel.CancelEventArgs
System.ComponentModel.CollectionChangeEventArgs
System.ComponentModel.Composition.Hosting.ComposablePartCatalogChangeEventArgs
System.ComponentModel.Composition.Hosting.ExportsChangeEventArgs
System.ComponentModel.CurrentChangingEventArgs
System.ComponentModel.DataErrorsChangedEventArgs
System.ComponentModel.Design.ActiveDesignerEventArgs
System.ComponentModel.Design.ActiveDesignSurfaceChangedEventArgs
System.ComponentModel.Design.ComponentChangedEventArgs
System.ComponentModel.Design.ComponentChangingEventArgs
System.ComponentModel.Design.ComponentEventArgs
System.ComponentModel.Design.ComponentRenameEventArgs
System.ComponentModel.Design.DesignerActionListsChangedEventArgs
System.ComponentModel.Design.DesignerActionUIStateChangeEventArgs
System.ComponentModel.Design.DesignerEventArgs
System.ComponentModel.Design.DesignerTransactionCloseEventArgs
System.ComponentModel.Design.DesignSurfaceEventArgs
System.ComponentModel.Design.LoadedEventArgs
System.ComponentModel.Design.MenuCommandsChangedEventArgs
System.ComponentModel.Design.Serialization.ResolveNameEventArgs
System.ComponentModel.HandledEventArgs
System.ComponentModel.ListChangedEventArgs
System.ComponentModel.ProgressChangedEventArgs
System.ComponentModel.PropertyChangedEventArgs
System.ComponentModel.PropertyChangingEventArgs
System.ComponentModel.RefreshEventArgs
System.Configuration.Install.InstallEventArgs
System.Configuration.Internal.InternalConfigEventArgs
System.Configuration.SettingsLoadedEventArgs
System.ConsoleCancelEventArgs
System.Data.Common.RowUpdatedEventArgs
System.Data.Common.RowUpdatingEventArgs
System.Data.DataColumnChangeEventArgs
System.Data.DataRowChangeEventArgs
System.Data.DataTableClearEventArgs
System.Data.DataTableNewRowEventArgs
System.Data.Entity.Design.PropertyGeneratedEventArgs
System.Data.Entity.Design.TypeGeneratedEventArgs
System.Data.FillErrorEventArgs
System.Data.MergeFailedEventArgs
System.Data.Objects.ObjectMaterializedEventArgs
System.Data.Odbc.OdbcInfoMessageEventArgs
System.Data.OleDb.OleDbInfoMessageEventArgs
System.Data.OracleClient.OracleInfoMessageEventArgs
System.Data.Services.Client.ReadingWritingEntityEventArgs
System.Data.Services.Client.SendingRequestEventArgs
System.Data.Services.DataServiceProcessingPipelineEventArgs
System.Data.Services.Design.PropertyGeneratedEventArgs
System.Data.Services.Design.TypeGeneratedEventArgs
System.Data.SqlClient.SqlInfoMessageEventArgs
System.Data.SqlClient.SqlNotificationEventArgs
System.Data.SqlClient.SqlRowsCopiedEventArgs
System.Data.StateChangeEventArgs
System.Data.StatementCompletedEventArgs
System.Device.Location.GeoPositionChangedEventArgs<T>
System.Device.Location.GeoPositionStatusChangedEventArgs
System.Diagnostics.Contracts.ContractFailedEventArgs
System.Diagnostics.DataReceivedEventArgs
System.Diagnostics.EntryWrittenEventArgs
System.Diagnostics.Eventing.Reader.EventRecordWrittenEventArgs
System.Diagnostics.Tracing.EventCommandEventArgs
System.Diagnostics.Tracing.EventWrittenEventArgs
System.Drawing.Design.PaintValueEventArgs
System.Drawing.Design.ToolboxComponentsCreatedEventArgs
System.Drawing.Design.ToolboxComponentsCreatingEventArgs
System.Drawing.Printing.PrintPageEventArgs
System.IdentityModel.Services.AuthorizationFailedEventArgs
System.IdentityModel.Services.Configuration.FederationConfigurationCreatedEventArgs
System.IdentityModel.Services.SessionSecurityTokenCreatedEventArgs
System.IdentityModel.Services.SigningOutEventArgs
System.IO.ErrorEventArgs
System.IO.FileSystemEventArgs
System.IO.Log.TailPinnedEventArgs
System.IO.Packaging.SignatureVerificationEventArgs
System.IO.Ports.SerialDataReceivedEventArgs
System.IO.Ports.SerialErrorReceivedEventArgs
System.IO.Ports.SerialPinChangedEventArgs
System.Management.ManagementEventArgs
System.Messaging.PeekCompletedEventArgs
System.Messaging.ReceiveCompletedEventArgs
System.Net.NetworkInformation.NetworkAvailabilityEventArgs
System.Net.PeerToPeer.Collaboration.ApplicationChangedEventArgs
System.Net.PeerToPeer.Collaboration.NameChangedEventArgs
System.Net.PeerToPeer.Collaboration.ObjectChangedEventArgs
System.Net.PeerToPeer.Collaboration.PeerNearMeChangedEventArgs
System.Net.PeerToPeer.Collaboration.PresenceChangedEventArgs
System.Net.PeerToPeer.Collaboration.SubscriptionListChangedEventArgs
System.Net.Sockets.SocketAsyncEventArgs
System.Net.WriteStreamClosedEventArgs
System.Printing.PrintSystemObjectPropertiesChangedEventArgs
System.Printing.PrintSystemObjectPropertyChangedEventArgs
System.ResolveEventArgs
System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs
System.Runtime.InteropServices.WindowsRuntime.DesignerNamespaceResolveEventArgs
System.Runtime.InteropServices.WindowsRuntime.NamespaceResolveEventArgs
System.Runtime.Serialization.SafeSerializationEventArgs
System.ServiceModel.Discovery.AnnouncementEventArgs
System.ServiceModel.Security.WSTrustRequestProcessingErrorEventArgs
System.ServiceModel.UnknownMessageReceivedEventArgs
System.Speech.Recognition.AudioLevelUpdatedEventArgs
System.Speech.Recognition.AudioSignalProblemOccurredEventArgs
System.Speech.Recognition.AudioStateChangedEventArgs
System.Speech.Recognition.RecognitionEventArgs
System.Speech.Recognition.RecognizerUpdateReachedEventArgs
System.Speech.Recognition.SpeechDetectedEventArgs
System.Speech.Recognition.StateChangedEventArgs
System.Speech.Synthesis.StateChangedEventArgs
System.Threading.Tasks.UnobservedTaskExceptionEventArgs
System.Threading.ThreadExceptionEventArgs
System.Timers.ElapsedEventArgs
System.Transactions.TransactionEventArgs
System.UnhandledExceptionEventArgs
System.Web.ApplicationServices.AuthenticatingEventArgs
System.Web.ApplicationServices.CreatingCookieEventArgs
System.Web.ApplicationServices.SelectingProviderEventArgs
System.Web.ApplicationServices.ValidatingPropertiesEventArgs
System.Web.ClientServices.Providers.SettingsSavedEventArgs
System.Web.ClientServices.Providers.UserValidatedEventArgs
System.Web.Compilation.BuildManagerHostUnloadEventArgs
System.Web.DynamicData.DynamicValidatorEventArgs
System.Web.ModelBinding.ModelValidatedEventArgs
System.Web.Profile.ProfileAutoSaveEventArgs
System.Web.Profile.ProfileEventArgs
System.Web.Profile.ProfileMigrateEventArgs
System.Web.Security.AnonymousIdentificationEventArgs
System.Web.Security.DefaultAuthenticationEventArgs
System.Web.Security.FormsAuthenticationEventArgs
System.Web.Security.PassportAuthenticationEventArgs
System.Web.Security.RoleManagerEventArgs
System.Web.Security.ValidatePasswordEventArgs
System.Web.Security.WindowsAuthenticationEventArgs
System.Web.SiteMapResolveEventArgs
System.Web.TraceContextEventArgs
System.Web.UI.AsyncPostBackErrorEventArgs
System.Web.UI.CompositeScriptReferenceEventArgs
System.Web.UI.DataVisualization.Charting.ChartPaintEventArgs
System.Web.UI.DataVisualization.Charting.CustomizeLegendEventArgs
System.Web.UI.DataVisualization.Charting.CustomizeMapAreasEventArgs
System.Web.UI.DataVisualization.Charting.FormatNumberEventArgs
System.Web.UI.Design.DesignerRegionMouseEventArgs
System.Web.UI.Design.TemplateModeChangedEventArgs
System.Web.UI.Design.ViewEventArgs
System.Web.UI.HistoryEventArgs
System.Web.UI.ImageClickEventArgs
System.Web.UI.MobileControls.ListDataBindEventArgs
System.Web.UI.MobileControls.LoadItemsEventArgs
System.Web.UI.MobileControls.ObjectListDataBindEventArgs
System.Web.UI.MobileControls.ObjectListSelectEventArgs
System.Web.UI.MobileControls.ObjectListShowCommandsEventArgs
System.Web.UI.ScriptReferenceEventArgs
System.Web.UI.WebControls.AdCreatedEventArgs
System.Web.UI.WebControls.AuthenticateEventArgs
System.Web.UI.WebControls.BulletedListEventArgs
System.Web.UI.WebControls.CallingDataMethodsEventArgs
System.Web.UI.WebControls.CommandEventArgs
System.Web.UI.WebControls.CreateUserErrorEventArgs
System.Web.UI.WebControls.CreatingModelDataSourceEventArgs
System.Web.UI.WebControls.DataGridItemEventArgs
System.Web.UI.WebControls.DataGridPageChangedEventArgs
System.Web.UI.WebControls.DataGridSortCommandEventArgs
System.Web.UI.WebControls.DataListItemEventArgs
System.Web.UI.WebControls.DetailsViewDeletedEventArgs
System.Web.UI.WebControls.DetailsViewInsertedEventArgs
System.Web.UI.WebControls.DetailsViewUpdatedEventArgs
System.Web.UI.WebControls.EntityDataSourceChangedEventArgs
System.Web.UI.WebControls.EntityDataSourceContextCreatedEventArgs
System.Web.UI.WebControls.EntityDataSourceContextCreatingEventArgs
System.Web.UI.WebControls.EntityDataSourceSelectedEventArgs
System.Web.UI.WebControls.Expressions.CustomExpressionEventArgs
System.Web.UI.WebControls.FormViewDeletedEventArgs
System.Web.UI.WebControls.FormViewInsertedEventArgs
System.Web.UI.WebControls.FormViewUpdatedEventArgs
System.Web.UI.WebControls.GridViewDeletedEventArgs
System.Web.UI.WebControls.GridViewRowEventArgs
System.Web.UI.WebControls.GridViewUpdatedEventArgs
System.Web.UI.WebControls.ImageMapEventArgs
System.Web.UI.WebControls.LinqDataSourceContextEventArgs
System.Web.UI.WebControls.LinqDataSourceStatusEventArgs
System.Web.UI.WebControls.ListViewDeletedEventArgs
System.Web.UI.WebControls.ListViewInsertedEventArgs
System.Web.UI.WebControls.ListViewItemEventArgs
System.Web.UI.WebControls.ListViewUpdatedEventArgs
System.Web.UI.WebControls.LoginCancelEventArgs
System.Web.UI.WebControls.ObjectDataSourceEventArgs
System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs
System.Web.UI.WebControls.PageEventArgs
System.Web.UI.WebControls.PagePropertiesChangingEventArgs
System.Web.UI.WebControls.QueryCreatedEventArgs
System.Web.UI.WebControls.RepeaterItemEventArgs
System.Web.UI.WebControls.SendMailErrorEventArgs
System.Web.UI.WebControls.ServerValidateEventArgs
System.Web.UI.WebControls.SiteMapNodeItemEventArgs
System.Web.UI.WebControls.SqlDataSourceStatusEventArgs
System.Web.UI.WebControls.TreeNodeEventArgs
System.Web.UI.WebControls.WebParts.WebPartAuthorizationEventArgs
System.Web.UI.WebControls.WebParts.WebPartConnectionsEventArgs
System.Web.UI.WebControls.WebParts.WebPartDisplayModeEventArgs
System.Web.UI.WebControls.WebParts.WebPartEventArgs
System.Web.UI.WebControls.WebParts.WebPartVerbsEventArgs
System.Web.UI.WebControls.WizardNavigationEventArgs
System.Windows.Annotations.AnnotationAuthorChangedEventArgs
System.Windows.Annotations.AnnotationResourceChangedEventArgs
System.Windows.Annotations.Storage.StoreContentChangedEventArgs
System.Windows.Automation.AutomationEventArgs
System.Windows.AutoResizedEventArgs
System.Windows.Controls.AddingNewItemEventArgs
System.Windows.Controls.DataGridAutoGeneratingColumnEventArgs
System.Windows.Controls.DataGridBeginningEditEventArgs
System.Windows.Controls.DataGridCellClipboardEventArgs
System.Windows.Controls.DataGridCellEditEndingEventArgs
System.Windows.Controls.DataGridColumnEventArgs
System.Windows.Controls.DataGridPreparingCellForEditEventArgs
System.Windows.Controls.DataGridRowClipboardEventArgs
System.Windows.Controls.DataGridRowDetailsEventArgs
System.Windows.Controls.DataGridRowEditEndingEventArgs
System.Windows.Controls.DataGridRowEventArgs
System.Windows.Controls.DatePickerDateValidationErrorEventArgs
System.Windows.Controls.InitializingNewItemEventArgs
System.Windows.Controls.InkCanvasStrokesReplacedEventArgs
System.Windows.Controls.Primitives.ItemsChangedEventArgs
System.Windows.Controls.SelectedCellsChangedEventArgs
System.Windows.Data.CollectionRegisteringEventArgs
System.Windows.Data.CollectionViewRegisteringEventArgs
System.Windows.Data.FilterEventArgs
System.Windows.Diagnostics.VisualTreeChangeEventArgs
System.Windows.Documents.PagesChangedEventArgs
System.Windows.Documents.PaginationProgressEventArgs
System.Windows.Documents.Serialization.WritingCancelledEventArgs
System.Windows.Documents.Serialization.WritingPrintTicketRequiredEventArgs
System.Windows.ExitEventArgs
System.Windows.Forms.BindingManagerDataErrorEventArgs
System.Windows.Forms.CacheVirtualItemsEventArgs
System.Windows.Forms.ColumnClickEventArgs
System.Windows.Forms.ColumnWidthChangedEventArgs
System.Windows.Forms.ContentsResizedEventArgs
System.Windows.Forms.ControlEventArgs
System.Windows.Forms.ConvertEventArgs
System.Windows.Forms.DataGridViewAutoSizeColumnModeEventArgs
System.Windows.Forms.DataGridViewAutoSizeColumnsModeEventArgs
System.Windows.Forms.DataGridViewAutoSizeModeEventArgs
System.Windows.Forms.DataGridViewBindingCompleteEventArgs
System.Windows.Forms.DataGridViewCellEventArgs
System.Windows.Forms.DataGridViewCellStateChangedEventArgs
System.Windows.Forms.DataGridViewCellStyleContentChangedEventArgs
System.Windows.Forms.DataGridViewCellValueEventArgs
System.Windows.Forms.DataGridViewColumnEventArgs
System.Windows.Forms.DataGridViewColumnStateChangedEventArgs
System.Windows.Forms.DataGridViewEditingControlShowingEventArgs
System.Windows.Forms.DataGridViewRowContextMenuStripNeededEventArgs
System.Windows.Forms.DataGridViewRowErrorTextNeededEventArgs
System.Windows.Forms.DataGridViewRowEventArgs
System.Windows.Forms.DataGridViewRowHeightInfoNeededEventArgs
System.Windows.Forms.DataGridViewRowPostPaintEventArgs
System.Windows.Forms.DataGridViewRowsAddedEventArgs
System.Windows.Forms.DataGridViewRowsRemovedEventArgs
System.Windows.Forms.DataGridViewRowStateChangedEventArgs
System.Windows.Forms.DataVisualization.Charting.AnnotationPositionChangingEventArgs
System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs
System.Windows.Forms.DataVisualization.Charting.CursorEventArgs
System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs
System.Windows.Forms.DataVisualization.Charting.FormatNumberEventArgs
System.Windows.Forms.DataVisualization.Charting.ScrollBarEventArgs
System.Windows.Forms.DataVisualization.Charting.ToolTipEventArgs
System.Windows.Forms.DataVisualization.Charting.ViewEventArgs
System.Windows.Forms.DateBoldEventArgs
System.Windows.Forms.DateRangeEventArgs
System.Windows.Forms.Design.Behavior.BehaviorDragDropEventArgs
System.Windows.Forms.DragEventArgs
System.Windows.Forms.DrawItemEventArgs
System.Windows.Forms.DrawListViewColumnHeaderEventArgs
System.Windows.Forms.DrawListViewItemEventArgs
System.Windows.Forms.DrawListViewSubItemEventArgs
System.Windows.Forms.DrawToolTipEventArgs
System.Windows.Forms.DrawTreeNodeEventArgs
System.Windows.Forms.FormClosedEventArgs
System.Windows.Forms.GiveFeedbackEventArgs
System.Windows.Forms.HelpEventArgs
System.Windows.Forms.HtmlElementErrorEventArgs
System.Windows.Forms.HtmlElementEventArgs
System.Windows.Forms.InputLanguageChangedEventArgs
System.Windows.Forms.Integration.ChildChangedEventArgs
System.Windows.Forms.Integration.IntegrationExceptionEventArgs
System.Windows.Forms.InvalidateEventArgs
System.Windows.Forms.ItemChangedEventArgs
System.Windows.Forms.ItemCheckedEventArgs
System.Windows.Forms.ItemCheckEventArgs
System.Windows.Forms.ItemDragEventArgs
System.Windows.Forms.KeyEventArgs
System.Windows.Forms.KeyPressEventArgs
System.Windows.Forms.LabelEditEventArgs
System.Windows.Forms.LayoutEventArgs
System.Windows.Forms.LinkClickedEventArgs
System.Windows.Forms.LinkLabelLinkClickedEventArgs
System.Windows.Forms.ListViewItemMouseHoverEventArgs
System.Windows.Forms.ListViewItemSelectionChangedEventArgs
System.Windows.Forms.ListViewVirtualItemsSelectionRangeChangedEventArgs
System.Windows.Forms.MaskInputRejectedEventArgs
System.Windows.Forms.MeasureItemEventArgs
System.Windows.Forms.MouseEventArgs
System.Windows.Forms.NavigateEventArgs
System.Windows.Forms.NodeLabelEditEventArgs
System.Windows.Forms.PaintEventArgs
System.Windows.Forms.PreviewKeyDownEventArgs
System.Windows.Forms.PropertyTabChangedEventArgs
System.Windows.Forms.PropertyValueChangedEventArgs
System.Windows.Forms.QueryAccessibilityHelpEventArgs
System.Windows.Forms.QueryContinueDragEventArgs
System.Windows.Forms.QuestionEventArgs
System.Windows.Forms.RetrieveVirtualItemEventArgs
System.Windows.Forms.ScrollEventArgs
System.Windows.Forms.SearchForVirtualItemEventArgs
System.Windows.Forms.SelectedGridItemChangedEventArgs
System.Windows.Forms.SplitterEventArgs
System.Windows.Forms.TabControlEventArgs
System.Windows.Forms.ToolBarButtonClickEventArgs
System.Windows.Forms.ToolStripArrowRenderEventArgs
System.Windows.Forms.ToolStripContentPanelRenderEventArgs
System.Windows.Forms.ToolStripDropDownClosedEventArgs
System.Windows.Forms.ToolStripItemClickedEventArgs
System.Windows.Forms.ToolStripItemEventArgs
System.Windows.Forms.ToolStripItemRenderEventArgs
System.Windows.Forms.ToolStripPanelRenderEventArgs
System.Windows.Forms.ToolStripRenderEventArgs
System.Windows.Forms.TreeNodeMouseHoverEventArgs
System.Windows.Forms.TreeViewEventArgs
System.Windows.Forms.TypeValidationEventArgs
System.Windows.Forms.UICuesEventArgs
System.Windows.Forms.UpDownEventArgs
System.Windows.Forms.WebBrowserDocumentCompletedEventArgs
System.Windows.Forms.WebBrowserNavigatedEventArgs
System.Windows.Forms.WebBrowserProgressChangedEventArgs
System.Windows.Ink.DrawingAttributesReplacedEventArgs
System.Windows.Ink.LassoSelectionChangedEventArgs
System.Windows.Ink.PropertyDataChangedEventArgs
System.Windows.Ink.StrokeCollectionChangedEventArgs
System.Windows.Ink.StrokeHitEventArgs
System.Windows.Ink.StylusPointsReplacedEventArgs
System.Windows.Input.AccessKeyEventArgs
System.Windows.Input.InputLanguageEventArgs
System.Windows.Input.InputMethodStateChangedEventArgs
System.Windows.Input.Manipulations.Manipulation2DCompletedEventArgs
System.Windows.Input.Manipulations.Manipulation2DDeltaEventArgs
System.Windows.Input.Manipulations.Manipulation2DStartedEventArgs
System.Windows.Input.NotifyInputEventArgs
System.Windows.Input.TouchFrameEventArgs
System.Windows.Markup.Localizer.BamlLocalizerErrorNotifyEventArgs
System.Windows.Markup.XamlSetValueEventArgs
System.Windows.Media.ExceptionEventArgs
System.Windows.Media.Imaging.DownloadProgressEventArgs
System.Windows.Media.MediaScriptCommandEventArgs
System.Windows.Media.RenderingEventArgs
System.Windows.Navigation.FragmentNavigationEventArgs
System.Windows.Navigation.NavigationEventArgs
System.Windows.Navigation.NavigationFailedEventArgs
System.Windows.Navigation.NavigationProgressEventArgs
System.Windows.Navigation.ReturnEventArgs<T>
System.Windows.RoutedEventArgs
System.Windows.Shell.JumpItemsRejectedEventArgs
System.Windows.Shell.JumpItemsRemovedEventArgs
System.Windows.StartupEventArgs
System.Windows.Threading.DispatcherEventArgs
System.Windows.Threading.DispatcherHookEventArgs
System.Windows.VisualStateChangedEventArgs
System.Windows.Xps.Packaging.PackagingProgressEventArgs
System.Windows.Xps.Serialization.XpsSerializationPrintTicketRequiredEventArgs
System.Workflow.Activities.ConditionalEventArgs
System.Workflow.Activities.ExternalDataEventArgs
System.Workflow.Activities.InvokeWebServiceEventArgs
System.Workflow.Activities.OperationValidationEventArgs
System.Workflow.Activities.ReplicatorChildEventArgs
System.Workflow.Activities.SendActivityEventArgs
System.Workflow.Activities.SetStateEventArgs
System.Workflow.ComponentModel.ActivityCollectionChangeEventArgs
System.Workflow.ComponentModel.ActivityExecutionStatusChangedEventArgs
System.Workflow.ComponentModel.Design.ActivityChangedEventArgs
System.Workflow.ComponentModel.Design.ActivityDesignerLayoutEventArgs
System.Workflow.ComponentModel.Design.ActivityDesignerPaintEventArgs
System.Workflow.ComponentModel.Design.ActivityDesignerResizeEventArgs
System.Workflow.ComponentModel.Design.ConnectorEventArgs
System.Workflow.ComponentModel.QueueEventArgs
System.Workflow.Runtime.CorrelationTokenEventArgs
System.Workflow.Runtime.ServicesExceptionNotHandledEventArgs
System.Workflow.Runtime.Tracking.ProfileRemovedEventArgs
System.Workflow.Runtime.Tracking.ProfileUpdatedEventArgs
System.Workflow.Runtime.Tracking.TrackingWorkflowChangedEventArgs
System.Workflow.Runtime.Tracking.TrackingWorkflowExceptionEventArgs
System.Workflow.Runtime.Tracking.TrackingWorkflowSuspendedEventArgs
System.Workflow.Runtime.Tracking.TrackingWorkflowTerminatedEventArgs
System.Workflow.Runtime.WorkflowEventArgs
System.Workflow.Runtime.WorkflowRuntimeEventArgs
System.Xaml.XamlObjectEventArgs
System.Xml.Linq.XObjectChangeEventArgs
System.Xml.Schema.ValidationEventArgs
System.Xml.Serialization.UnreferencedObjectEventArgs
System.Xml.Serialization.XmlAttributeEventArgs
System.Xml.Serialization.XmlElementEventArgs
System.Xml.Serialization.XmlNodeEventArgs
System.Xml.XmlNodeChangedEventArgs
System.Xml.Xsl.XsltMessageEncounteredEventArgs

[SerializableAttribute]
[ComVisibleAttribute(true)]
public class EventArgs

名称说明
System_CAPS_pubmethodEventArgs()

初始化 EventArgs 类的新实例。

名称说明
System_CAPS_pubmethodEquals(Object)

确定指定的对象是否等于当前对象。(从 Object 继承。)

System_CAPS_protmethodFinalize()

在垃圾回收将某一对象回收前允许该对象尝试释放资源并执行其他清理操作。(从 Object 继承。)

System_CAPS_pubmethodGetHashCode()

作为默认哈希函数。(从 Object 继承。)

System_CAPS_pubmethodGetType()

获取当前实例的 Type(从 Object 继承。)

System_CAPS_protmethodMemberwiseClone()

创建当前 Object 的浅表副本。(从 Object 继承。)

System_CAPS_pubmethodToString()

返回表示当前对象的字符串。(从 Object 继承。)

名称说明
System_CAPS_pubfieldSystem_CAPS_staticEmpty

提供要用于没有事件数据的事件的值。

此选件类用作基类用作表示事件数据中的所有选件类。例如,System.AssemblyLoadEventArgs 选件类从 EventArgs 派生并使用保存数据。程序集加载事件。若要创建自定义事件数据类,创建从 EventArgs 选件类派生的选件类并提供了属性存储所需的数据。您的自定义事件数据类的名称应以 EventArgs结束。

若要通过不包含任何数据的对象,请使用 Empty 字段。

有关以下内容的详细信息,请参见事件该 处理和引发事件 文章。

下面的示例演示从 EventArgs 选件类派生的自定义事件数据类名为 ThresholdReachedEventArgs事件数据类的实例传递给 ThresholdReached 事件的事件处理程序。

using System;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Counter c = new Counter(new Random().Next(10));
            c.ThresholdReached += c_ThresholdReached;

            Console.WriteLine("press 'a' key to increase total");
            while (Console.ReadKey(true).KeyChar == 'a')
            {
                Console.WriteLine("adding one");
                c.Add(1);
            }
        }

        static void c_ThresholdReached(object sender, ThresholdReachedEventArgs e)
        {
            Console.WriteLine("The threshold of {0} was reached at {1}.", e.Threshold,  e.TimeReached);
            Environment.Exit(0);
        }
    }

    class Counter
    {
        private int threshold;
        private int total;

        public Counter(int passedThreshold)
        {
            threshold = passedThreshold;
        }

        public void Add(int x)
        {
            total += x;
            if (total >= threshold)
            {
                ThresholdReachedEventArgs args = new ThresholdReachedEventArgs();
                args.Threshold = threshold;
                args.TimeReached = DateTime.Now;
                OnThresholdReached(args);
            }
        }

        protected virtual void OnThresholdReached(ThresholdReachedEventArgs e)
        {
            EventHandler<ThresholdReachedEventArgs> handler = ThresholdReached;
            if (handler != null)
            {
                handler(this, e);
            }
        }

        public event EventHandler<ThresholdReachedEventArgs> ThresholdReached;
    }

    public class ThresholdReachedEventArgs : EventArgs
    {
        public int Threshold { get; set; }
        public DateTime TimeReached { get; set; }
    }
}

Universal Windows Platform
4.5 后可用
.NET Framework
1.1 后可用
Portable Class Library
受以下版本支持:portable .NET platforms
Silverlight
2.0 后可用
Windows Phone Silverlight
7.0 后可用
Windows Phone
8.1 后可用

此类型的任何公共静态(Visual Basic 中为 Shared)成员都是线程安全的。但不保证所有实例成员都是线程安全的。

返回页首
显示:
© 2016 Microsoft