Пожалуйста, смотрите XAML ниже:
<ContentPage.ToolbarItems>
<ToolbarItem
Command="{Binding SettingsCommand}"
Text="Settings">
<ToolbarItem.Icon>
<OnPlatform x:TypeArguments="FileImageSource">
<On Platform="iOS, Android" Value="app_settings" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets/app_settings.png" />
</OnPlatform>
</ToolbarItem.Icon>
</ToolbarItem>
</ContentPage.ToolbarItems>
<TabbedPage.Title>
<OnPlatform x:TypeArguments="x:String">
<On Platform="iOS, UWP, WinRT, WinPhone" Value="MyNamespace" />
</OnPlatform>
</TabbedPage.Title>
<views:TestEnquiriesView
x:Name="TestView">
<views:TestEnquiriesView.Title>Test</views:TestEnquiriesView.Title>
</views:TestEnquiriesView>
<views:ProfileView
x:Name="ProfileView">
<views:ProfileView.Icon>
<OnPlatform x:TypeArguments="FileImageSource">
<On Platform="iOS, Android" Value="menu_profile" />
<On Platform="UWP, WinRT, WinPhone" Value="Assets\menu_profile.png" />
</OnPlatform>
</views:ProfileView.Icon>
</views:ProfileView>
app_settings.png и menu_profile.png правильно отображаются на Android, однако в UWP отображается только menu_profile.png.Почему?
Кстати, на странице есть два предупреждения:
1) The attachable property ToolbarItems was not found in type ContentPage
в этой строке: <ContentPage.ToolbarItems>
.
2) The property default is set more than once
в этой строке: <On Platform="UWP, WinRT, WinPhone" Value="Assets\menu_profile.png" />
Я использую Visual Studio 2017.