Xamarin形成UWP,我如何使用图标化和图像

Xamarin形成UWP,我如何使用图标化和图像,xamarin,uwp,xamarin.forms,xamarin.uwp,Xamarin,Uwp,Xamarin.forms,Xamarin.uwp,我有一个Xamarin PCL Android/iOS/UWP项目。我正在为应用程序使用一些图标。问题是UWP不显示任何图标,但Android会显示 像这样: 我的表格: 我是否错过了一个掘金或UWP dosent支持图标化 UWP中安装的用于iconize的熔核: Xam.Plugin.Iconize.FontAwsome Xam.Plugin.Iconize Xam.FormsPlugin.Iconize FontAwsome.UWP 这是一个已知但未确认的问题,在当前版本中似乎没有得到解

我有一个Xamarin PCL Android/iOS/UWP项目。我正在为应用程序使用一些图标。问题是UWP不显示任何图标,但Android会显示

像这样:

我的表格:

我是否错过了一个掘金或UWP dosent支持图标化

UWP中安装的用于iconize的熔核:

Xam.Plugin.Iconize.FontAwsome Xam.Plugin.Iconize Xam.FormsPlugin.Iconize FontAwsome.UWP
这是一个已知但未确认的问题,在当前版本中似乎没有得到解决。我也经历过同样的问题

解决方法是:

在根目录中创建Plugin.Iconize.Material.UWP\Assets\font\文件夹 你的项目。 将fontawesome.ttf复制到新目录并设置 将较新的复制为其输出。
    <?xml version="1.0" encoding="utf-8" ?>
<controls:BasePage xmlns="http://xamarin.com/schemas/2014/forms"
                   xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                   xmlns:controls="clr-namespace:Volaapp.Controls;assembly:Volaapp"
                   xmlns:converters="clr-namespace:Volaapp.Converters;assembly:Volaapp"
                   xmlns:icons="clr-namespace:FormsPlugin.Iconize;assembly=FormsPlugin.Iconize"
                   xmlns:xlabs="clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms"
                   x:Class="Volaapp.Pages.CreateTodoPage"
                   BackgroundColor="{StaticResource GrayColor}"
                   Title="Lisa uus võlg">
  <ScrollView BackgroundColor="{StaticResource WhiteColor}">
    <StackLayout Margin="10"
                 BackgroundColor="{StaticResource WhiteColor}">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="65"/>
          <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition Height="65"/>
          <RowDefinition Height="65"/>
          <RowDefinition Height="65"/>
          <RowDefinition Height="65"/>
          <RowDefinition/>
        </Grid.RowDefinitions>

        <!--Nimi ja Summa-->
        <StackLayout Grid.Column="0" Grid.Row="0"
                     BackgroundColor="{StaticResource MetroWhiteColor}"
                     VerticalOptions="FillAndExpand"
                     HorizontalOptions="FillAndExpand">
          <icons:IconImage VerticalOptions="CenterAndExpand"
                 HorizontalOptions="Center"
                 Icon="fa-gg"
                 IconColor="{StaticResource MetroBlackColor}"
                 HeightRequest="30"/>
        </StackLayout>
        <StackLayout Grid.Column="1" Grid.Row="0"
                     Orientation="Vertical"
                     BackgroundColor="{StaticResource MetroWhiteColor}"
                     HorizontalOptions="FillAndExpand"
                     VerticalOptions="FillAndExpand">
          <StackLayout Orientation="Vertical"
                       BackgroundColor="{StaticResource WhiteColor}"
                       HorizontalOptions="FillAndExpand"
                       VerticalOptions="FillAndExpand"
                       Margin="0,1,1,1">
            <Entry Text="{Binding Title}"
                   Placeholder="Sisesta pealkiri"
                   VerticalOptions="EndAndExpand"
                   Keyboard="Text"
                   Margin="15,0,15,2"/>
            <Entry 
                   VerticalOptions="EndAndExpand"
                   Placeholder="Sisesta Summa!"
                   Text="{Binding Loan}"
                   Keyboard="Numeric"
                   Margin="15,2,15,10"
          />
          </StackLayout>
        </StackLayout>

        <!--Inimesed-->
        <StackLayout Grid.Column="0" Grid.Row="1"
                     BackgroundColor="{StaticResource MetroWhiteColor}"
                     VerticalOptions="FillAndExpand"
                     HorizontalOptions="FillAndExpand">
          <icons:IconImage VerticalOptions="CenterAndExpand"
                 HorizontalOptions="Center"
                 Icon="fa-user"
                 IconColor="{StaticResource MetroBlackColor}"
                 HeightRequest="30"/>
        </StackLayout>
        <StackLayout Grid.Column="1" Grid.Row="1"
                     Orientation="Vertical"
                     BackgroundColor="{StaticResource MetroWhiteColor}"
                     HorizontalOptions="FillAndExpand"
                     VerticalOptions="FillAndExpand">
          <StackLayout Orientation="Vertical"
                       BackgroundColor="{StaticResource WhiteColor}"
                       HorizontalOptions="FillAndExpand"
                       VerticalOptions="FillAndExpand"
                       Margin="0,1,1,1">
            <controls:BindablePicker Margin="20,5"
                                     ItemsSource="{Binding Tags}"
                                     SelectedItem="{Binding SelectedTag, Mode=TwoWay}"
                                     DisplayMemberPath="Title"
                                     Title="Vali inimene"
                                     VerticalOptions="EndAndExpand"/>
          </StackLayout>
        </StackLayout>

        <!--Rahatäht-->
        <StackLayout Grid.Column="0" Grid.Row="2"
                     BackgroundColor="{StaticResource MetroWhiteColor}"
                     VerticalOptions="FillAndExpand"
                     HorizontalOptions="FillAndExpand">
          <icons:IconImage VerticalOptions="CenterAndExpand"
                 HorizontalOptions="Center"
                 Icon="fa-money"
                 IconColor="{StaticResource MetroBlackColor}"
                 HeightRequest="30"/>
        </StackLayout>
        <StackLayout Grid.Column="1" Grid.Row="2"
                     Orientation="Vertical"
                     BackgroundColor="{StaticResource MetroWhiteColor}"
                     HorizontalOptions="FillAndExpand"
                     VerticalOptions="FillAndExpand">
          <StackLayout Orientation="Vertical"
                       BackgroundColor="{StaticResource WhiteColor}"
                       HorizontalOptions="FillAndExpand"
                       VerticalOptions="FillAndExpand"
                       Margin="0,1,1,1">
            <controls:BindablePicker Margin="20,5"
                                     ItemsSource="{Binding CurrencyList}"
                                     SelectedItem="{Binding Currency, Mode=TwoWay}"
                                     Title="Vali Rahatäht"
                                     VerticalOptions="EndAndExpand"/>
          </StackLayout>
        </StackLayout>

        <!--Due date-->
        <StackLayout Grid.Column="0" Grid.Row="3"
                     Orientation="Vertical"
                     BackgroundColor="{StaticResource MetroWhiteColor}"
                     VerticalOptions="FillAndExpand"
                     HorizontalOptions="FillAndExpand">

          <xlabs:ImageButton Image="_duedate.png"
                   ImageHeightRequest="35"
                   ImageWidthRequest="35"
                   BackgroundColor="{StaticResource MetroWhiteColor}"
                   VerticalOptions="CenterAndExpand"
                   HorizontalOptions="Center"
                   BorderRadius="0"
                   Command="{Binding SelectDueDateCommand}"/>
        </StackLayout>
        <StackLayout Grid.Column="1" Grid.Row="3"
                     BackgroundColor="{StaticResource MetroWhiteColor}"
                     HorizontalOptions="FillAndExpand"
                     VerticalOptions="FillAndExpand">
          <StackLayout BackgroundColor="{StaticResource WhiteColor}"
                       HorizontalOptions="FillAndExpand"
                       VerticalOptions="FillAndExpand"
                       Margin="0,1,1,1">
            <Label Text="{Binding DueTime, StringFormat='Kuupäev  {0:dd.MM.yyyy HH:mm}'}"
                   FontSize="17"
                   Margin="25,0"
                   TextColor="{StaticResource BlackColor}"
                   VerticalTextAlignment="Start"
                   VerticalOptions="CenterAndExpand"
                   HorizontalOptions="StartAndExpand">
            </Label>
          </StackLayout>
        </StackLayout>

        <!--Meeldetuletus-->
        <StackLayout Grid.Column="0" Grid.Row="4"
                     Orientation="Vertical"
                     BackgroundColor="{StaticResource MetroWhiteColor}"
                     VerticalOptions="FillAndExpand"
                     HorizontalOptions="FillAndExpand">
          <Image HeightRequest="35"
                 WidthRequest="35"
                 Source="{Binding ReminderIcon}"
                 VerticalOptions="CenterAndExpand"
                 HorizontalOptions="CenterAndExpand">
          </Image>


        </StackLayout>
        <StackLayout Grid.Column="1" Grid.Row="4"
                     BackgroundColor="{StaticResource MetroWhiteColor}"
                     HorizontalOptions="FillAndExpand"
                     VerticalOptions="FillAndExpand">
          <StackLayout BackgroundColor="{StaticResource WhiteColor}"
                       Orientation="Horizontal"
                       HorizontalOptions="FillAndExpand"
                       VerticalOptions="FillAndExpand"
                       Margin="0,1,1,1">
            <Label Text="Meeldetuletus"
                   FontSize="17"
                   Margin="25,0,0,0"
                   TextColor="{StaticResource BlackColor}"
                   VerticalTextAlignment="Start"
                   VerticalOptions="CenterAndExpand"
                   HorizontalOptions="Start"/>
            <Switch IsToggled="{Binding EnableReminder, Mode=TwoWay}"
                    VerticalOptions="CenterAndExpand"
                    HorizontalOptions="Start"
                    Margin="20,0"/>
          </StackLayout>
        </StackLayout>

        <!--Button-->
        <StackLayout Grid.Column="1" Grid.Row="5"
                   Orientation="Horizontal" Margin="0,30"
                   HorizontalOptions="EndAndExpand"
                   VerticalOptions="CenterAndExpand">
          <xlabs:ImageButton
                             BackgroundColor="{StaticResource MetroWhiteColor}"
                             Text="SAVE" FontSize="12"
                             IsEnabled="{Binding IsValid}"
                             HorizontalOptions="StartAndExpand"
                             HeightRequest="40"
                             WidthRequest="100"
                             BorderRadius="0"
                             Command="{Binding SaveCommand}"/>
          <xlabs:ImageButton
                           BackgroundColor="{StaticResource MetroWhiteColor}"
                           Text="CANCEL"
                           HorizontalOptions="StartAndExpand"
                           BorderRadius="0"
                           HeightRequest="40"
                           WidthRequest="100"
                           FontSize="12"
                           Command="{Binding CancelCommand}"/>
        </StackLayout>
      </Grid>
    </StackLayout>
  </ScrollView>
</controls:BasePage>