uwp项目中如何使用FFImageLoading的FFImage

How to use FFImageLoading's FFImage in uwp project

我在Nuget中下载Xamarin.FFImageLoading.Forms,说明说它支持uwp。我关注了 FFImageLoading/samples/Simple.WinUniversal.Sample/,并在 MainPage.xaml 中提到了

xmlns:ff="using:FFImageLoading"
xmlns:fft="using:FFImageLoading.Transformations"

我想用FFImage,所以

        <ff:FFImage Name="Image"
                Grid.Row="1"
                VerticalAlignment="Stretch"
                HorizontalAlignment="Stretch"
                TransformPlaceholders="False"
                LoadingPlaceholder="loading.png"
                ErrorPlaceholder="error.png"
                CacheDuration="30"
                RetryCount="3"
                RetryDelay="250"
                Height="500"
                Width="500"
                DownsampleToViewSize="True"
                DownsampleMode="None"
                Source="http://loremflickr.com/600/600/nature?filename=simple.jpg">

    </ff:FFImage>

但设计师展示

Unknown type 'FFImage' in XML namespace 'using:FFImageLoading'

那么,正确的使用方法是什么FFImage。谢谢

How to use FFImageLoading's FFImage in uwp project

请检查这个line, it is Xamarin.Froms控件,它不能在原生uwp项目中使用。

对于 uwp 平台,我们建议使用 ImageEX to replace that one. For more please refer this document .

<controls:ImageEx x:Name="ImageExControl1"
     IsCacheEnabled="True"
     Source="/Assets/Photos/LunchBreak.jpg"
     PlaceholderSource="/Assets/Photos/ImageExPlaceholder.jpg"
     Style="{StaticResource BaseStyle}"/>