Skip to content

Instantly share code, notes, and snippets.

💾
Bashing __(ง'̀-'́)ง__ bugs

Lance McCarthy LanceMcCarthy

💾
Bashing __(ง'̀-'́)ง__ bugs
Block or report user

Report or block LanceMcCarthy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View MainPage.xaml.cs
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
CreatePieChart();
}
private void CreatePieChart()
View MainPage.xaml
<Page x:Class="ShadowBorder.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ShadowBorder"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.DataContext>
@LanceMcCarthy
LanceMcCarthy / ConversionHelpers.cs
Last active Jan 7, 2019
A Xamarin.Forms Effect where you can subscribe to an event handler when the keyboard is shown
View ConversionHelpers.cs
public static class ConversionHelpers
{
public static Xamarin.Forms.Rectangle AsRectangle(this CGRect o)
{
return new Xamarin.Forms.Rectangle
{
Height = o.Height,
Width = o.Width,
X = o.X,
Y = o.Y,
@LanceMcCarthy
LanceMcCarthy / MainPage.xaml
Created Dec 28, 2018
Custom Image Slider UWP
View MainPage.xaml
<Page x:Class="SliderDemo.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:SliderDemo"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
@LanceMcCarthy
LanceMcCarthy / LoginDialog.xaml
Created Dec 6, 2018
LoginDialog - A Live SDK authentication helper for UWP applications
View LoginDialog.xaml
<ContentDialog
x:Class="YourUwpApp.LoginDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
SecondaryButtonText="cancel"
SecondaryButtonClick="LoginDialog_OnSecondaryButtonClick">
@LanceMcCarthy
LanceMcCarthy / MainPage.xaml
Created Oct 15, 2018
Simple EmptyStringValidator Attached Property
View MainPage.xaml
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SelectionPerPlatform.Portable"
xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
x:Class="Example.Portable.MainPage">
<telerikInput:RadEntry local:TelerikValidator.EmptyStringValidator="True"
VerticalOptions="Center"
Margin="10"/>
</ContentPage>
@LanceMcCarthy
LanceMcCarthy / Program.cs
Last active Aug 28, 2018
Brotli Compression Test
View Program.cs
using System;
using System.Collections.ObjectModel;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using static System.Console;
namespace BrotliTest
View DateRangeChangedEventArgs.cs
public class DateRangeChangedEventArgs : System.EventArgs
{
public DateRangeChangedEventArgs(DateTime startDate, DateTime endDate)
{
StartDate = startDate;
EndDate = endDate;
}
public DateTime StartDate { get; set; }
@LanceMcCarthy
LanceMcCarthy / FileExtensions.cs
Last active Jul 16, 2018
XamarinForms NET Standard 2.0
View FileExtensions.cs
public static class FileExtensions
{
private static readonly string LocalFolder;
static FileExtensions()
{
// Gets the target platform's valid save location
LocalFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
}
View StartPage.xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:dataControls="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls"
xmlns:input="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
x:Class="TelerikXamarinApp1.Portable.StartPage">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
You can’t perform that action at this time.