This works (the icon is shown) in all platforms including Windows Phone 8.1:
<ToolbarItem Name="{resx:Translate MainPageLogOutLabel}" Command="{Binding LogOutCommand}" Order="Primary" Priority="0" Icon = "LogOut.png" />
However, I only want the icon showing on Windows Phone 8.1. The following Xaml does not work, however:
<ToolbarItem Name="{resx:Translate MainPageLogOutLabel}" Command="{Binding LogOutCommand}" Order="Primary" Priority="0">
<ToolbarItem.Icon>
<OnPlatform x:TypeArguments="FileImageSource"
WinPhone="LogOut.png" />
</ToolbarItem.Icon>
</ToolbarItem>
And I also tried this syntax, which also does not work:
<ToolbarItem Name="{resx:Translate MainPageLogOutLabel}" Command="{Binding LogOutCommand}" Order="Primary" Priority="0">
<ToolbarItem.Icon>
<OnPlatform x:TypeArguments="FileImageSource">
<OnPlatform.WinPhone>LogOut.png</OnPlatform.WinPhone>
</OnPlatform>
</ToolbarItem.Icon>
</ToolbarItem>
Any ideas?