Skip to content

Instantly share code, notes, and snippets.

@dkudelko
dkudelko / scale.cs
Last active August 29, 2015 14:17 — forked from nicwise/scale.cs
public static UIImage ScaleImage(UIImage image, int maxSize)
{
UIImage res;
using (CGImage imageRef = image.CGImage)
{
CGImageAlphaInfo alphaInfo = imageRef.AlphaInfo;
CGColorSpace colorSpaceInfo = CGColorSpace.CreateDeviceRGB();
if (alphaInfo == CGImageAlphaInfo.None)
@dkudelko
dkudelko / CircleImageAndroid.cs
Created December 7, 2015 12:50 — forked from jamesmontemagno/CircleImageAndroid.cs
Circle Image from Xamarin Evolve
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;
@dkudelko
dkudelko / License.txt
Created January 22, 2016 08:27 — forked from rizal-almashoor/License.txt
Exception-handling wrappers for Task.ContinueWith()
Copyright (c) 2012 Rizal Almashoor
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
@dkudelko
dkudelko / CustomAllViewCellRendereriOS.cs
Created June 24, 2016 13:16 — forked from jessejiang0214/CustomAllViewCellRendereriOS.cs
Disable Xamarin Forms ListView select item HightLight color
using System;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer (typeof(ViewCell), typeof(MyAPP.iOS.CustomAllViewCellRendereriOS))]
namespace MyAPP.iOS
{
public class CustomAllViewCellRendereriOS : ViewCellRenderer
{
public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv)
@dkudelko
dkudelko / ExtendedSearchBarRenderer.cs
Created July 18, 2016 09:14 — forked from xleon/ExtendedSearchBarRenderer.cs
Xamarin.Forms renderer to hide the "Cancel" button of a SearchBar on iOS
using System;
using Xamarin.Forms.Platform.iOS;
using Xamarin.Forms;
using UIKit;
using System.Diagnostics;
[assembly: ExportRenderer(typeof(SearchBar), typeof(Namespace.iOS.Renderers.ExtendedSearchBarRenderer))]
namespace Namespace.iOS.Renderers
{