Skip to content

Instantly share code, notes, and snippets.

View sonnemaf's full-sized avatar

Fons Sonnemans sonnemaf

View GitHub Profile
@sonnemaf
sonnemaf / .editorconfig
Last active June 28, 2020 11:12
My personal EditorConfig file
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
# C# files
[*.cs]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 4
@sonnemaf
sonnemaf / MainPage.xaml
Created June 18, 2018 08:26
UnderlinedRadioButtonStyle
<Page x:Class="App34.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App34"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
RequestedTheme="Dark"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
@sonnemaf
sonnemaf / MainPage.xaml
Last active April 5, 2018 08:39
RequiredHeaderTemplate and BoldHeaderTemplate for XAML #UWP
<Page x:Class="App18.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App18"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.Resources>
<FontWeight x:Key="HeaderFontWeight">Medium</FontWeight>
@sonnemaf
sonnemaf / gist:0001b88db198be33d83f346a47ad874f
Created December 14, 2017 21:02
InParameterOnNonReadonlyStructAnalyzer
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
@sonnemaf
sonnemaf / NavigateBackAction.cs
Created October 13, 2015 08:56
NavigateBackAction XAML Behavior for Blend
public class NavigateBackAction : DependencyObject, IAction {
/// <summary>
/// Navigate the Frame back
/// </summary>
/// <param name="sender"></param>
/// <param name="parameter"></param>
/// <returns>True if navigated</returns>
public object Execute(object sender, object parameter) {