im quite new in vb programming..
i have this code snippet in my Form.xaml
<MenuItem Name="testItem" Background="Gray" Width="37" >
<MenuItem.Icon>
<Image Source="Image\test.png" Width="35" Height="35"/>
</MenuItem.Icon>
</MenuItem>
and in my Form.xaml.vb how do I access testItem’s Background? I did something like
testItem.Background = Colors.Blue
but it doesnt work..
The Background property of the Menu expects a Brush, not a Color. You could use a SolidColorBrush like this: