There is a XAML:
<Menu Width="Auto"> <MenuItem ItemsSource="{Binding Path=листОбъектов, Source={x:Static тут:статичекий.синглтон.класса}}"> <MenuItem.Header> <Image Source="Какой_нибудь_путь_к_картинке" Width="16" Height="16"/> </MenuItem.Header> <MenuItem.ItemContainerStyle> <Style TargetType="{x:Type MenuItem}"> <Setter Property="Header" Value="{Binding Path=TypeObjectName}"/> <Setter Property="Icon"> <Setter.Value> <Image Width="16" Height="16" Source="{Binding Path=IconSource}" /> </Setter.Value> </Setter> </Style> </MenuItem.ItemContainerStyle> </MenuItem> </Menu>
IconSource is filled everywhere, but only the last item has icons in MenuItem .