ListViewItemMouseHoverEventArgs Класс
Определение
Предоставляет данные для события ItemMouseHover.Provides data for the ItemMouseHover event.
public ref class ListViewItemMouseHoverEventArgs : EventArgs
public class ListViewItemMouseHoverEventArgs : EventArgs
[System.Runtime.InteropServices.ComVisible(true)]
public class ListViewItemMouseHoverEventArgs : EventArgs
type ListViewItemMouseHoverEventArgs = class
inherit EventArgs
[<System.Runtime.InteropServices.ComVisible(true)>]
type ListViewItemMouseHoverEventArgs = class
inherit EventArgs
Public Class ListViewItemMouseHoverEventArgs
Inherits EventArgs
- Наследование
- Атрибуты
Примеры
В следующем примере кода демонстрируется использование этого типа.The following code example demonstrates the use of this type. В этом примере обработчик событий сообщает о возникновении ItemMouseHover события.In the example, an event handler reports on the occurrence of the ItemMouseHover event. Этот отчет поможет вам узнать, когда происходит событие и может помочь при отладке.This report helps you to learn when the event occurs and can assist you in debugging. Чтобы сообщить о нескольких событиях или о событиях, которые происходят часто, рассмотрите возможность замены Show Console.WriteLine или добавления сообщения в многострочный TextBox .To report on multiple events or on events that occur frequently, consider replacing Show with Console.WriteLine or appending the message to a multiline TextBox.
Чтобы выполнить пример кода, вставьте его в проект, содержащий экземпляр типа ListView с именем ListView1
.To run the example code, paste it into a project that contains an instance of type ListView named ListView1
. Затем убедитесь, что обработчик событий связан с ItemMouseHover событием.Then ensure that the event handler is associated with the ItemMouseHover event.
private void ListView1_ItemMouseHover(Object sender, ListViewItemMouseHoverEventArgs e) {
System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "Item", e.Item );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "ItemMouseHover Event" );
}
Private Sub ListView1_ItemMouseHover(sender as Object, e as ListViewItemMouseHoverEventArgs) _
Handles ListView1.ItemMouseHover
Dim messageBoxVB as New System.Text.StringBuilder()
messageBoxVB.AppendFormat("{0} = {1}", "Item", e.Item)
messageBoxVB.AppendLine()
MessageBox.Show(messageBoxVB.ToString(),"ItemMouseHover Event")
End Sub
Комментарии
Это ItemMouseHover событие возникает при наведении указателя мыши на объект ListViewItem .The ItemMouseHover event occurs when the mouse pointer hovers over a ListViewItem.
Конструкторы
ListViewItemMouseHoverEventArgs(ListViewItem) |
Инициализирует новый экземпляр класса ListViewItemMouseHoverEventArgs.Initializes a new instance of the ListViewItemMouseHoverEventArgs class. |
Свойства
Item |
Получает элемент, над которым в текущий момент перемещается указатель мыши.Gets the item the mouse pointer is currently hovering over. |
Методы
Equals(Object) |
Определяет, равен ли указанный объект текущему объекту.Determines whether the specified object is equal to the current object. (Унаследовано от Object) |
GetHashCode() |
Служит хэш-функцией по умолчанию.Serves as the default hash function. (Унаследовано от Object) |
GetType() |
Возвращает объект Type для текущего экземпляра.Gets the Type of the current instance. (Унаследовано от Object) |
MemberwiseClone() |
Создает неполную копию текущего объекта Object.Creates a shallow copy of the current Object. (Унаследовано от Object) |
ToString() |
Возвращает строку, представляющую текущий объект.Returns a string that represents the current object. (Унаследовано от Object) |