serhio
serhio

Reputation: 28596

Specify a size for ContextMenu MenuItem Icon

I defined a WPF ContextMenu MenuItem Icon.

Now I see in this menu images(icons) of different sizes...

Could I explicitly set the icon size of this item?

Upvotes: 2

Views: 3803

Answers (1)

Nicolas
Nicolas

Reputation: 6524

Yes, you can specify the width and the heigth of your images :

<ContextMenu>
    <MenuItem>
        <MenuItem.Icon>
            <Image Width="50" Height="50" Source="..." />
        </MenuItem.Icon>
    </MenuItem>
    <MenuItem>
        <MenuItem.Icon>
            <Image Width="50" Height="50" Source="..." />
        </MenuItem.Icon>
    </MenuItem>
</ContextMenu>

Upvotes: 6

Related Questions