View RotatedTextView.cs
using Android.Content; | |
using Android.Widget; | |
using Android.Util; | |
using Android.Graphics; | |
namespace Droid | |
{ | |
public class RotatedTextView : TextView | |
{ | |
public RotatedTextView(Context ctx, IAttributeSet attr) |
View BitmapExtensions.cs
using Android.App; | |
using Android.Support.V8.Renderscript; | |
namespace Droid | |
{ | |
public static class BitmapUtil | |
{ | |
public static Bitmap Blur(Bitmap originalBitmap) | |
{ | |
// Create the Renderscript instance that will do the work. |
View DpiToPixelConverter.cs
using Android.Content; | |
namespace Droid | |
{ | |
public static class DpiToPixelConverter | |
{ | |
public static int Convert(int dpi) | |
{ | |
float scale = Application.Context.Resources.DisplayMetrics.Density; | |
return (int)(dpi * scale + 0.5f); |
View NotifyPropertyChanged.cs
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Mvvm | |
{ |
View Command.cs
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Input; | |
namespace Mvvm | |
{ | |
public class Command : ICommand |
View Distance.cs
using System; | |
using Android.App; | |
using Android.Hardware; | |
using Android.Views; | |
namespace Droid | |
{ | |
public static class Distance | |
{ | |
public static double CalculateSplineFlingDistance(float velocity) |
View RoundedCornersFrameLayout.cs
using Android.Content; | |
using Android.Graphics; | |
using Android.Util; | |
using Android.Widget; | |
namespace Droid | |
{ | |
public class RoundedCornersFrameLayout : FrameLayout | |
{ | |
private const float CornerRadius = 5.0f; |
View BytesConverter.cs
using System; | |
namespace CSharp | |
{ | |
public static class BytesConverter | |
{ | |
public static double ConvertBytesToKB(long bytes) | |
{ | |
return bytes / 1024f; | |
} |
View StringConverter.cs
namespace CSharp | |
{ | |
public static class StringConverter | |
{ | |
public static string Capitalized(string text) | |
{ | |
if (string.IsNullOrEmpty(text)) | |
{ | |
return text; | |
} |
View UIImageConverter.cs
using UIKit; | |
using CoreImage; | |
namespace iOS | |
{ | |
public static class UIImageConverter | |
{ | |
public static UIImage Blur(UIImage image) | |
{ | |
var ciImage = new CIImage(image); |
OlderNewer