<MenuItem.Icon>
<StackPanel>
<Image Source="/Consolecomponent/Icon/Mini-brightgreen.png"></Image>
</StackPanel>
</MenuItem.Icon>
</MenuItem>
要注意以下几个方面,先后顺序未必正确,有可能多设几次ToolBar.ShowCaption
:=
True
2.设置ToolButton大小
ImageList.Width
ImageList.Height
3.设置菜单关联
4.设置运行时显示图标(这个是关键)
ToolButton.Menuitum.ImageIndex
要保证MenuItem所在的MainMenu没有设置Image,否则,Menu中会同时显示Icon
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)