Skip to content

Instantly share code, notes, and snippets.

View ButchersBoy's full-sized avatar
💭
Taking a break from open source.

James Willock ButchersBoy

💭
Taking a break from open source.
View GitHub Profile
@ButchersBoy
ButchersBoy / BloomFilter.cs
Created September 15, 2016 18:09 — forked from haneytron/BloomFilter.cs
A simple Bloom Filter implementation in C#
using System;
namespace BloomFilter
{
class Program
{
static void Main(string[] args)
{
AddItem("test");
AddItem("test2");
System.NullReferenceException
Object reference not set to an instance of an object.
at Microsoft.VisualStudio.DesignTools.UniversalXamlDesigner.UniversalXamlPlatformMetadata.IsExpression(ITypeId type)
at Microsoft.VisualStudio.DesignTools.Designer.ViewModel.SceneNode.GetRawComputedValueInternal(PropertyReference propertyReference)
at Microsoft.VisualStudio.DesignTools.Designer.ViewModel.XamlSceneNode.GetComputedValueInternal(PropertyReference propertyReference)
at Microsoft.VisualStudio.DesignTools.Designer.ViewModel.XamlSceneNode.GetLiveValueInternal(PropertyReference propertyReference)
at Microsoft.VisualStudio.DesignTools.Designer.UI.PropertyInspector.SceneNodeObjectSet.GetValue(PropertyReference propertyReference, GetValueFlags getValueFlags)
at Microsoft.VisualStudio.DesignTools.Designer.UI.PropertyInspector.SceneNodeObjectSet.GetValue(PropertyReference property)
at Microsoft.VisualStudio.DesignTools.Designer.UI.PropertyInspector.SceneNodeObjectSet.GetValue(PropertyReferenceProperty
@ButchersBoy
ButchersBoy / PaletteSelectorWindow.xaml
Created August 31, 2015 11:06
Palette Helper in Code-behind
<Window x:Class="MaterialDesignColors.WpfExample.PaletteSelectorWindow"
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"
xmlns:local="clr-namespace:MaterialDesignColors.WpfExample"
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
xmlns:materialDesignColors="clr-namespace:MaterialDesignColors;assembly=MaterialDesignColors"
mc:Ignorable="d"
Title="PaletteSelectorWindow" Height="300" Width="300"
@ButchersBoy
ButchersBoy / Application.xaml
Created August 22, 2015 12:40
Changing Accent color in VB.Net #36
<Application x:Class="Application"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- MahApps -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
@ButchersBoy
ButchersBoy / _ResharperTemplatesForXAML
Last active June 25, 2019 12:04
My Resharper Templates
These files are resharper llive templates for working with XAML. Invaluable if you building custom controls.
@ButchersBoy
ButchersBoy / C#: view model, attached property, and "coordinator"
Created April 28, 2015 15:56
Demo of how to call MahApps dialogs from a view model, without knowledge of MetroWindow. MVVM framework agnostic.
public partial class Mah : UserControl
{
public Mah()
{
DataContext = new MahViewModel();
InitializeComponent();
}
}
public class MahViewModel