This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using PropertyChanged; | |
using System.ComponentModel; | |
using ImageFilterSample.Helpers; | |
namespace ImageFilterSample.Models | |
{ | |
public class Filter : INotifyPropertyChanged | |
{ | |
public FilterType Type { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Windows.Input; | |
using FFImageLoading.Forms; | |
using ImageFilterSample.Helpers; | |
using Xamarin.Forms; | |
namespace ImageFilterSample.Controls | |
{ | |
public class FilterImage : CachedImage | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="ImageFilterSample.MainPage" | |
xmlns:controls="clr-namespace:ImageFilterSample.Controls" | |
Title="Filter Image Sample"> | |
<ContentPage.Content> | |
<StackLayout VerticalOptions="FillAndExpand" Spacing="0"> | |
<AbsoluteLayout VerticalOptions="FillAndExpand"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.ObjectModel; | |
using System.Windows.Input; | |
using ImageFilterSample.Helpers; | |
using ImageFilterSample.Models; | |
using Xamarin.Forms; | |
using System.ComponentModel; | |
using System.Threading.Tasks; | |
using System.Linq; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FFImageLoading.Forms.Droid; | |
using FFImageLoading.Forms; | |
using Xamarin.Forms; | |
using ImageFilterSample.Controls; | |
using ImageFilterSample.Droid.Renderers; | |
using Android.Graphics; | |
using ImageFilterSample.Helpers; | |
using Xamarin.Forms.Platform.Android; | |
using System.Threading.Tasks; | |
using Android.Widget; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async void ApplyFilter(FilterType filterType) | |
{ | |
if (currentFilterType == filterType) | |
return; | |
var filterImage = Element as FilterImage; | |
//originalBitmap = await GetBitmapAsync(filterImage.OriginalSource); | |
using (Bitmap originalBitmap = await GetBitmapAsync(filterImage.OriginalSource)) | |
{ | |
var oldFilteredBitmap = filteredBitmap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async void ApplyFilter(FilterType filterType) | |
{ | |
if (currentFilterType == filterType) | |
return; | |
var filterImage = Element as FilterImage; | |
var handler = GetHandler(filterImage.OriginalSource); | |
using (UIImage originalImage = await handler.LoadImageAsync(filterImage.OriginalSource)) | |
{ | |
switch (filterType) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ZoomableApp.iOS.Renderers; | |
using UIKit; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.iOS; | |
using System.Linq; | |
[assembly: ExportRenderer(typeof(ScrollView), typeof(ZoomScrollViewRenderer))] | |
namespace ZoomableApp.iOS.Renderers | |
{ | |
public class ZoomScrollViewRenderer : ScrollViewRenderer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Android.App; | |
using Android.Content; | |
using Android.OS; | |
using Android.Runtime; | |
using Android.Views; | |
using Android.Widget; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="ZoomScrollViewSample.MainPage" | |
BackgroundColor="Black"> | |
<ContentPage.Content> | |
<ScrollView> | |
<StackLayout> | |
<Image Margin="0,30,0,0" Source="monkey" HeightRequest="60" HorizontalOptions="Center"/> | |
<Label Margin="40" FontSize="10" VerticalTextAlignment="Center" TextColor="White" Text="Monkeys are haplorhine primates, a group generally possessing tails and consisting of about 260 known living species. There are two distinct lineages of monkeys: New World Monkeys and catarrhines. Apes emerged within the catarrhines with the Old World monkeys as a sister group, so cladistically they are monkeys as well. However, traditionally apes are not considered monkeys, rendering this grouping paraphyletic. The equivalent monophyletic clade are the simians. Many monkey species are tr |
OlderNewer