Настройка значка MenuItem с помощью средства настройки стилей

<Style x:Key="ContextMenuItemStyle" TargetType="{x:Type MenuItem}">
    <Setter Property="Icon" Value="{Binding Icon}" />
    <Setter Property="Header" Value="{Binding Text}" />
    <Setter Property="ItemsSource" Value="{Binding Children}" />
    <Setter Property="Command" Value="{Binding Command}" />
</Style>

установив его в коде следующим образом:

Uri refreshUri = new Uri("..\\Resources\\Refresh16.bmp",UriKind.Relative);
BitmapImage refreshIcon = new BitmapImage();
refreshIcon.UriSource = refreshUri;

Значок не появляются какие-нибудь подсказки?

5
задан Fredrik Hedblad 3 March 2011 в 23:42
поделиться