Current location - Recipe Complete Network - Complete cookbook - When creating a menu using code in WPF, what is the statement that assigns a value to the icon of the menu item?
When creating a menu using code in WPF, what is the statement that assigns a value to the icon of the menu item?

menuItem1.Icon =

new Image() { Source = new BitmapImage(new Uri("Images/cc.jpg", UriKind.RelativeOrAbsolute)) };

It seems that the bmp format is not supported by wpf