WPF:MenuItem加Icon

December 4, 2014 at 7:39 PMAdmin

我曾經嘗試MenuItem的Icon參數來設定Icon,原來是要改Header元件。

如下:

<MenuItem 
					 Name="GridButton" Visibility="Collapsed" Click="GridButton_Click">
<MenuItem.Header>
      <StackPanel>
	<Image Source="../Images/open.png"  Width="16" Height="16"/>
</StackPanel>
</MenuItem.Header>
</MenuItem>

Posted in: C#

Tags:

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading