我正在尝试将 WPF 用户控件放在WinForm
使用中ElementHost
,但由于我的图标未显示在按钮上。
http://gyazo.com/7dc201e30246b2b2676060de0ebf35a9
http://gyazo.com/67f039ce310d17a2d270c816ebc5fb3b
<ToolBar>
<Button>
<StackPanel Orientation="Horizontal">
<Image Source="pack://siteoforigin:,,,/Resources/document-add2.png" Stretch="None" Margin="0,0,3,0" />
<TextBlock>Добавить стратегию</TextBlock>
</StackPanel>
</Button>
<Button>
<StackPanel Orientation="Horizontal">
<Image Source="pack://siteoforigin:,,,/Resources/document-delete2.png" Stretch="None" Margin="0,0,3,0" />
<TextBlock>Удалить стратегию</TextBlock>
</StackPanel>
</Button>
<Separator></Separator>
<Button>
<StackPanel Orientation="Horizontal">
<Image Source="pack://siteoforigin:,,,/Resources/document-control_play.png" Stretch="None" Margin="0,0,3,0" />
<TextBlock>Запустить стратегию</TextBlock>
</StackPanel>
</Button>
<Separator></Separator>
<Button>
<StackPanel Orientation="Horizontal">
<Image Source="pack://siteoforigin:,,,/Resources/document-gear.png" Stretch="None" Margin="0,0,3,0" />
<TextBlock>Изменить настройки</TextBlock>
</StackPanel>
</Button>
</ToolBar>