Skip to content

Commit

Permalink
Xamarin.Forms: Added StreamTest sample
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-luberda committed Jan 12, 2016
1 parent 6169896 commit 77fd5ac
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions samples/ImageLoading.Forms.Sample/Shared/Pages/StreamTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public StreamTest()
WidthRequest = 300,
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center,
//DownsampleToViewSize = true,
};

var button = new Button() {
Expand All @@ -35,6 +34,7 @@ public StreamTest()
Stream = new Func<CancellationToken, Task<Stream>>(async (arg) => new MemoryStream(bytes))
};

cachedImage.CacheKeyFactory = new CustomCacheKeyFactory();
cachedImage.Source = streamSource;

})
Expand All @@ -51,7 +51,6 @@ public StreamTest()

// First we load an image from http source
cachedImage.Source = "http://loremflickr.com/600/600/nature?filename=stream.jpg";
cachedImage.CacheKeyFactory = new CustomCacheKeyFactory();
}

class CustomCacheKeyFactory : ICacheKeyFactory
Expand Down

0 comments on commit 77fd5ac

Please sign in to comment.