Update source image to valid image we control

This commit is contained in:
E.Z. Hart 2017-12-28 16:46:59 -07:00
Родитель 77851e6ff7
Коммит dfa3172bb5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 1196DD903A2F7606
1 изменённых файлов: 2 добавлений и 16 удалений

Просмотреть файл

@ -6,24 +6,10 @@ namespace Xamarin.Forms.Controls
{ {
internal class ImageCoreGalleryPage : CoreGalleryPage<Image> internal class ImageCoreGalleryPage : CoreGalleryPage<Image>
{ {
static readonly Random Rand = new Random (); protected override bool SupportsFocus => false;
protected override bool SupportsFocus
{
get { return false; }
}
protected override void InitializeElement (Image element) protected override void InitializeElement (Image element)
{ {
// var sourceIndex = rand.Next (0, 3);
//
// var sources = new [] {
// ImageSource.FromFile ("oasis.jpg"),
// //ImageSource.FromUri (new Uri("http://www.nasa.gov/sites/default/files/styles/1600x1200_autoletterbox/public/images/298773main_EC02-0282-3_full.jpg")),
// //ImageSource.FromResource ("Xamarin.Forms.Controls.ControlGalleryPages.crimson.jpg")
// };
//element.Source = sources[sourceIndex];
element.Source = "oasissmall.jpg"; element.Source = "oasissmall.jpg";
} }
@ -43,7 +29,7 @@ namespace Xamarin.Forms.Controls
InitializeElement (isLoadingContainer.View); InitializeElement (isLoadingContainer.View);
InitializeElement (isOpaqueContainer.View); InitializeElement (isOpaqueContainer.View);
var sourceContainer = new ViewContainer<Image> (Test.Image.Source, new Image { Source = "http://sethrosetter.com/images/projects/bezierdraw/bezierdraw_5.jpg" }); var sourceContainer = new ViewContainer<Image> (Test.Image.Source, new Image { Source = "https://raw.githubusercontent.com/xamarin/Xamarin.Forms/master/Xamarin.Forms.Controls/coffee.png" });
Add (aspectFillContainer); Add (aspectFillContainer);
Add (aspectFitContainer); Add (aspectFitContainer);