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
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=""
<RowDefinition Height="Auto" />
LanceMcCarthy / ThemeHelper.cs
Created Feb 19, 2018
Helper class to change theme resources at runtime
View ThemeHelper.cs
using Telerik.XamarinForms.Common;
using Xamarin.Forms;
namespace YourAwesomeApp.Helpers
public static class ThemeHelper
public static void ChangeTheme(string themeName)
if(Application.Current.Resources != null)
LanceMcCarthy / CustomTheme.xaml
Created Feb 19, 2018
Custom Theme for UI for Xamarin
View CustomTheme.xaml
<ResourceDictionary xmlns=""
<!-- Chart -->
<Color x:Key="ChartAxisColor">#919191</Color>
<Color x:Key="ChartGridLinesColor">#D9D9D9</Color>
<!-- ListView -->
<Color x:Key="ListViewItemBorderColor">Azure</Color>
LanceMcCarthy / ItemViewModel.cs
Created Dec 2, 2017
FlyoutPresenter with Acrylic Brush Background
View ItemViewModel.cs
public class ItemViewModel
public string Title { get; set; }
public string ThumbnailUrl { get; set; }
public List<string> Details { get; set; }
LanceMcCarthy / MainViewModel.cs
Created Jan 10, 2017
ManiulationDrawer demo view model and model
View MainViewModel.cs
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using DetailsDrawer.Annotations;
namespace DetailsDrawer.ViewModels
public class MainPageViewModel : INotifyPropertyChanged
private ObservableCollection<RouteStep> routeSteps;
LanceMcCarthy / MainPage.xaml.cs
Created Jan 10, 2017
ManipulationDrawer demo main page code behind
View MainPage.xaml.cs
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
namespace DetailsDrawer
public sealed partial class MainPage : Page
public MainPage()
LanceMcCarthy / MainPage.xaml
Last active Jan 10, 2017
ManipulatedDrawer XAML
View MainPage.xaml
<Page x:Class="DetailsDrawer.MainPage"
LanceMcCarthy / ThemeModel.cs
Created Sep 22, 2016
Custom Themeing model for Xamarin Forms' DynamicResource
View ThemeModel.cs
public class ThemeModel : INotifyPropertyChanged
private Color backgroundColor;
private Color textColor;
private Color buttonBackgroundColor;
private Color buttonTextColor;
private Color accentColor;
private Color headerColor;
LanceMcCarthy / FadeHeaderBehavior.cs
Last active Dec 1, 2018
Fading ListView or GridView Header
View FadeHeaderBehavior.cs
public class FadeHeaderBehavior : Behavior<FrameworkElement>
public static readonly DependencyProperty HeaderElementProperty = DependencyProperty.Register(
"HeaderElement", typeof(UIElement), typeof(FadeHeaderBehavior), new PropertyMetadata(null, PropertyChangedCallback));
public UIElement HeaderElement
get { return (UIElement) GetValue(HeaderElementProperty); }
set { SetValue(HeaderElementProperty, value); }
You can’t perform that action at this time.