wpf 是否有可用于 EventTrigger EventNames 的列表?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22060381/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 00:03:55  来源:igfitidea点击:

Is there a list available for EventTrigger EventNames?

wpfevents

提问by azmuhak

I do not seem to find a list of available EventNames used in EventTriggers for different UI elements in WPF. I know some of the commonly used Event Names like

我似乎没有找到用于 WPF 中不同 UI 元素的 EventTriggers 中可用的 EventNames 列表。我知道一些常用的事件名称,例如

  1. Loaded
  2. Click
  1. 已加载
  2. 点击

But it would be nice to get a list of all the event names available for example for a GridElement.

但是如果能得到一个所有可用事件名称的列表,例如一个Grid元素,那就太好了。

采纳答案by daniellepelley

The best resource for this would probably be Microsoft's documentation. For instance this is a list of all the events for a WPF grid.

最好的资源可能是 Microsoft 的文档。例如,这是 WPF 网格的所有事件的列表。

http://msdn.microsoft.com/en-us/library/system.windows.controls.grid_events(v=vs.110).aspx

http://msdn.microsoft.com/en-us/library/system.windows.controls.grid_events(v=vs.110).aspx

回答by Martin

In Visual Studio you can also see the list of available events for a certain control. They all should be usable as event triggers.

在 Visual Studio 中,您还可以查看某个控件的可用事件列表。它们都应该可用作事件触发器。

Just click on the respective control in the designer and take a look at the properties tab.

只需单击设计器中的相应控件并查看属性选项卡。

There should be a "flash" symbol at the top right corner of the properties tab. By clicking on it, you can change from "property view" to the "event view" of the control you selected. You will then see all available events for the selected control.

属性选项卡的右上角应该有一个“闪光”符号。通过单击它,您可以从“属性视图”更改为所选控件的“事件视图”。然后您将看到所选控件的所有可用事件。

You can then search for the documentation in the event your are interested in.

然后,您可以在感兴趣的情况下搜索文档。