CommandManager.RequerySuggested Event


CommandManager 检测可能更改要执行的命令的功能的条件时发生。Occurs when the CommandManager detects conditions that might change the ability of a command to execute.

 static event EventHandler ^ RequerySuggested;
public static event EventHandler RequerySuggested;
member this.RequerySuggested : EventHandler 
Public Shared Custom Event RequerySuggested As EventHandler 


此事件将处理程序作为弱引用保存到处理程序中。This event holds onto the handler as a weak reference. 侦听此事件的对象应保持对其事件处理程序的强引用,以避免被垃圾回收。Objects that listen for this event should keep a strong reference to their event handler to avoid it being garbage collected. 这可以通过在附加到此事件之前或之后将该处理程序作为值进行分配来实现。This can be accomplished by having a private field and assigning the handler as the value before or after attaching to this event.

Applies to