Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO: Show a bitmap for a menu item

 
Subscribe to the RSS feed for this forum  Forum Index -> FileView.Net/WPF
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Tue Jan 27, 2009 8:55 am    Post subject: HOWTO: Show a bitmap for a menu item

Use the following code in the PopupContextMenu event of the FileView Control to show a bitmap for a menu item :

[C#]
Code:
private void flView_PopupContextMenu(object sender, LogicNP.FileViewControl.PopupContextMenuEventArgs e)
{
  ShellMenuItem newMenuItem = e.ShellMenu.AddItem("Custom Menu Item");
  //Set the path of the bitmap file here
  newMenuItem.SetBitmap(new Bitmap("C:\\mybitmap.bmp"));   
}

[VB.Net]
Code:
Private Sub flView_PopupContextMenu(ByVal sender As System.Object, ByVal e As LogicNP.FileViewControl.PopupContextMenuEventArgs) Handles flView.PopupContextMenu
 
  Dim newMenuItem As ShellMenuItem = e.ShellMenu.AddItem("SubMenu")
  'Set the path of the bitmap file here
  newMenuItem.SetBitmap(New Bitmap("C:\\mybitmap.bmp"))

End Sub
Back to top
Display posts from previous:   
Forum Index -> FileView.Net/WPF All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group