私はvbプログラミングでかなり新しいです。
Form.xamlにこのコードスニペットがあります
<MenuItem Name="testItem" Background="Gray" Width="37" >
<MenuItem.Icon>
<Image Source="Image\test.png" Width="35" Height="35"/>
</MenuItem.Icon>
</MenuItem>
Form.xaml.vbでtestItemの背景にアクセスするにはどうすればよいですか?私は次のようなことをしました
testItem.Background = Colors.Blue
しかし、それは機能しません。