如果发生这种事件,而且关联的事件处理常式中有程序码,就会叫用此程序码。
If one of these events occurs and there is code in the associated event handler, that code is invoked.
不过,您可以在事件处理常式方法中修改配置,而这代表配置会在呈现之前再计算一次。
However, you can modify layout in your event handler method, which means that layout will be computed once more before rendering.
使用此方法便能使得服务不但能扩充至任何事件配置,也能取代特定型别的事件处理常式。
This way the service can be extended to any eventing scheme, and it also allows specific types of event handlers to be replaced.
这个功能允许您视情况设定或是变更系结方法,并且动态地将事件处理常式附加到控制项。
With this feature, you can set up or change the bound method depending on a condition and to dynamically attach an event handler to a control.
已拥有处理常式的事件会以粗体显示。
在[设计]检视中,选取您要建立事件处理常式的控制项。
In Design view, select the control that you want to create an event handler for.
事件处理常式就是透过委派叫用的方法。
Event handlers are nothing more than methods that are invoked through delegates.
事件处理常式是程序码中的程序,它会决定当事件发生时所要执行的动作,例如,当使用者按一下按钮时,或是当讯息伫列收到讯息时。
An event handler is a procedure in your code that determines what actions are performed when an event occurs, such as when the user clicks a button or a message queue receives a message.
这项服务会实作“事件堆叠”,其中包含目前的事件处理常式集。
This service implements an "event stack" that contains the current set of event handlers.
当设计工具要求事件处理常式时,此服务便会在堆叠中寻找符合您所要求类别的最上层处理常式。
When a designer requests an event handler, the service will find the topmost handler on the stack that matches the class you requested.
如果附加了超过一个符合准则的处理常式,则只会移除事件处理常式存放区中的第一个处理常式。
If more than one handler is attached that matched the criteria, only the first handler in the event handler store is removed.
借由选取物件然后选取事件,即可建立新的事件处理常式。
You can create a new event handler by selecting the object and then selecting the event.
一般用于接听事件的技术,是使用语言特定的语法来附加处理常式到来源事件。
The typical technique for listening to an event is to use the language-specific syntax that attaches a handler to an event on a source.
一般是由事件处理常式组成,但是可以包含您需要的任何方法或属性。
This typically consists of event handlers, but can include any methods or properties that you need.
事件可以被指定给多个处理常式,而且可以变更处理特定事件的方法。
Events can be assigned to multiple handlers, and the methods that handle particular events can be changed dynamically.
在属性值中,输入事件处理常式的名称。
本范例显示如何使用程序码,将事件处理常式加入到项目中。
This example shows how to add an event handler to an element by using code.
将事件处理常式方法名称当做值使用。
设计应用程序时,您可能会发现多个事件必须使用同一个事件处理常式,或是多个事件会执行相同的程序。
In your application design, you may find it necessary to use a single event handler for multiple events or have multiple events perform the same procedure.
此事件的处理常式能够根据错误种类,而执行通知工作或尝试更正动作,其中包括隐藏错误。
A handler for this event might be able to perform notification tasks or attempt corrective action, including suppressing the error, depending on the error.
在要加入事件处理常式的物件项目内,加入名称与要处理的事件相符的属性。
Within the object element where you want to add the event handler, add an attribute that matches the name of the event that you want to handle.
输入事件处理常式名称,或保留空白以使用预设名称。
Type the event handler name or leave it blank to use the default name.
此外,如果视觉化树状结构的变更强制更新复合场景图形,也会呼叫事件处理常式方法。
In addition, if changes to the visual tree force updates to the composition scene graph, your event handler method is also called.
示范如何定义事件处理常式,并将它加入到另一个类别中引发的事件。
Shows how to define an event handler and add it to an event raised in another class.
借由选取物件然后选取事件,即可建立新的处理常式。
You can create a new handler by selecting the object and then selecting the event.
自订事件允许事件非同步呼叫它的事件处理常式。
Custom events allow the event to call its event handlers asynchronously.
每当第一个资料来源变更时,第二个资料来源的查询就会经由事件处理常式来更新。
Whenever the first data source changes, the second data source's query is updated through an event handler.
例如,您可以在不影响功能表事件处理常式或键盘事件处理常式的情况下,取代滑鼠事件处理常式。
For example, you can replace mouse event handlers without affecting menu event handlers or keyboard event handlers.
接著将该属性的值指定为您在 XAML页面的程式码后置档案中所定义的事件处理常式方法的名称。
Then specify the value of that attribute as the name of the event handler method that you defined in the code-behind file of the XAML page.
在原本剖析的XAML页面中加入事件处理常式要简单许多。
Adding an event handler in the initially parsed XAML page is much simpler.
应用推荐