从单击图库项目启动 WinForm[DevExpress]
它试图做到这一点,以便当用户单击图库项目图像时,它将调用关联的 WinForm。
即:单击 RibbonGalleryBarItem1 中的图像调用关联的 winform。
汽车图像将启动汽车形式。任何有关如何执行此操作或类似操作的想法将不胜感激。
It trying to make it so when the user click the gallery item image that it will call the associated WinForm.
ie: Clicking the image from ribbonGalleryBarItem1 call the associated winform.
car image will start the car form. Any ideas on how to do this, or something like this would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
处理ribbonGalleryBarItem1对象的GalleryItemClick事件。 e.Item 参数返回单击的项目。使用其属性,您应该能够确定单击了哪个项目并调用代码以显示所需的表单。
例如:
Handle the GalleryItemClick event of the ribbonGalleryBarItem1 object. The e.Item parameter returns the clicked item. Using its properties, you should be able to determine which exactly item was clicked and invoke the code to show the required form.
For example:
您需要创建一个处理程序来处理所有图像点击。
然后,需要定义一个方法来区分每次调用。
例如,按名称或按标签。
这实际上取决于您如何实现画廊及其内部的图像。
更多信息可以帮助您更好地了解如何解决您的问题。
我只能猜测您正在使用 PictureBoxes 来显示图像。如果是这种情况,那么您需要定义 Click 事件的处理程序并实现如下所示的内容:
您也可以使用 Tag 属性。但同样,这取决于您如何构建画廊。
希望这有帮助。
You need to create a handler that will handle all image clicks.
Then, you need to define a method to distinguish each call.
Either by name or by tag, for example.
It really depends on how you implemented the galleries and the images inside them.
More information can help better understand how to solve your problem.
I can only guess that you are using PictureBoxes to display your images. If it's the case, then you need to define the handler for Click event and implement something like this:
You can use the Tag property as well. But again, it depends on how you contruct your galleries.
Hope this helps.