Skip to content

Instantly share code, notes, and snippets.

View jesulink2514's full-sized avatar
🎯
Focusing

Jesus Angulo jesulink2514

🎯
Focusing
View GitHub Profile
var container = new Grid
{
Children = {
_background,
_label
}
};
CompressedLayout.SetIsHeadless(container,true);
_background = new NControlView
{
DrawingFunction = (canvas, rect) =>
{
var brush = new LinearGradientBrush(
Point.Zero,
Point.OneX,
Color.FromHex("#6C6FEC").ToNColor(),
Color.FromHex("#5A41B9").ToNColor());
var curveSize = BorderRadius;
var width = rect.Width;
var height = rect.Height;
var brush = new LinearGradientBrush(
Point.Zero,
Point.OneX,
Color.FromHex("#6C6FEC").ToNColor(),
Color.FromHex("#5A41B9").ToNColor());
using NControl.Abstractions;
using NGraphics;
using Xamarin.Forms;
using Color = Xamarin.Forms.Color;
namespace DemoGradient.Controls
{
public static class ColorHelpers
{
public static NGraphics.Color ToNColor(this Color color)
using NControl.Abstractions;
using NGraphics;
using System.Collections.Generic;
namespace DemoGradient.Controls
{
public class GradientButton : NControlView
{
private readonly Label _label;
private readonly NControlView _background;
using NControl.Abstractions;
using NGraphics;
using System.Collections.Generic;
namespace DemoGradient.Controls
{
public class GradientButton : NControlView
{
private readonly Label _label;
private readonly NControlView _background;
using NControl.Abstractions;
using NGraphics;
using System.Collections.Generic;
namespace DemoGradient.Controls
{
public class GradientButton : NControlView
{
private readonly Label _label;
private readonly NControlView _background;
using NControl.Abstractions;
using NGraphics;
using System.Collections.Generic;
namespace DemoGradient.Controls
{
public class GradientButton : NControlView
{
}
@jesulink2514
jesulink2514 / AssemblyInfo.cs
Created February 8, 2019 04:22
Xmlns declaration
using Xamarin.Forms;
[assembly: XmlnsDefinition("http://somostechies.com/techies", "Techies.Common.XF.Controls")]
[assembly: XmlnsDefinition("http://somostechies.com/techies", "Techies.Common.XF.Converters")]
namespace Techies.Common.XF{}