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 -> FolderView.Net/WPF
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

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

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

[C#]
Code:
private void fldrView_PopupContextMenu(object sender, LogicNP.FolderViewControl.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 fldrView_PopupContextMenu(ByVal sender As Object, ByVal e As LogicNP.FolderViewControl.PopupContextMenuEventArgs)
 
  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 -> FolderView.Net/WPF All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group