Skip to content

Instantly share code, notes, and snippets.

View ScottIsAFool's full-sized avatar

Scott Lovegrove ScottIsAFool

View GitHub Profile
@ScottIsAFool
ScottIsAFool / CustomCommandBar.cs
Created October 23, 2014 09:42
Example of custom CommandBar
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;
using MyApp.Extensions;
namespace MyApp.Controls
{
public class CustomCommandBar : CommandBar
{
public CustomCommandBar()
@ScottIsAFool
ScottIsAFool / UriExtensions.cs
Created January 16, 2015 17:38
UriExtension returning IDictionary<string, string>
public static class UriExtensions
{
/// <summary>
/// Gets a collection of query string values.
/// </summary>
/// <param name="uri">The current uri.</param>
/// <returns>A collection that contains the query string values.</returns>
public static IDictionary<string, string> QueryString(this Uri uri)
{
var uriString = uri.IsAbsoluteUri ? uri.AbsoluteUri : uri.OriginalString;
@ScottIsAFool
ScottIsAFool / IListType.cs
Last active August 29, 2015 14:27
Files needed to do inline ads/reviews/whatever
namespace ScottIsAFool.Windows.Core.ViewModel
{
public interface IListType
{
ListType ListType { get; }
}
}
@ScottIsAFool
ScottIsAFool / PathIconButton.xaml
Created August 10, 2016 09:04
A button control template that accepts path data as its content.
<Page
x:Class="App4.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App4"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.Resources>
@ScottIsAFool
ScottIsAFool / DropFileBehaviour.cs
Last active August 29, 2016 14:32
DropFileBehaviour and its usage
using System;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Input;
using Windows.ApplicationModel.DataTransfer;
using Windows.Storage;
using Windows.UI.Xaml;
using ScottIsAFool.Model;
using Microsoft.Xaml.Interactivity;
@ScottIsAFool
ScottIsAFool / App.cs
Last active March 10, 2017 18:35
Cimbalino Navigation for Xamarin.Forms
// This is an example of the usage
private static INavigationService Navigation => SimpleIoc.Default.GetInstance<INavigationService>();
public App(IContainer container)
{
container.Create();
SetNavigationHomePage();
}