简体   繁体   中英

Use an event handler provided by a library

I've been trying to figure out how to use this event handler from the library ImageListView. I've been trying for the last half hour and I'm completely lost and have no clue how to use this thing. I haven't been able to type anything that comes close to compiling. Here's what I am trying to use我想用什么

and here is the documentation on it https://oozcitak.github.io/imagelistview/obj/api/Manina.Windows.Forms.ImageListView.html#Manina_Windows_Forms_ImageListView_ItemClick

Any help would be greatly appreciated

If I understand the problem (and looking at the source), it should be as simple as

seriesCoverList.ItemClick += DoItemClick;

...

public void DoItemClick(object sender, ItemClickEventArgs e)
{
}

Note just to clarify, ItemDoubleClick has the same signature

seriesCoverList.ItemDoubleClick += DoItemDoubleClick;

...

public void DoItemDoubleClick(object sender, ItemClickEventArgs e)
{
}

Note from xWolfz

You also need

using Manina.Windows.Forms;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM