Skip to content

Instantly share code, notes, and snippets.


Vincent Hoogendoorn VincentH-Net

View GitHub Profile
VincentH-Net / .editorconfig
Created July 4, 2022 17:21
.editorconfig naming rule for NO underscore prefix on private fields
View .editorconfig
# Start of NO underscore prefix on private fields
# Define the 'private_fields' symbol group:
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
# Define the 'notunderscored' naming style
dotnet_naming_style.notunderscored.capitalization = camel_case
dotnet_naming_style.notunderscored.required_prefix =
# Define the 'private_fields_notunderscored' naming rule
VincentH-Net / RegistrationCodePage.cs
Last active April 4, 2022 18:47
C# language proposal examples for UI markup #CSharpForMarkup
View RegistrationCodePage.cs
// C# vNext markup friendly
enum Row { Icon, Prompt, Header, Entry }
void Build() => Content = new Grid
RowDefinitions = Rows.Define(
(Icon , Auto),
(Prompt, Auto),
(Header, 50 ),
(Entry , Auto)
VincentH-Net / WhiteIBeam1.cape
Last active October 2, 2017 10:12
White IBeam cursor to fix mouse visibility in Visual Studio for Mac text editor on dark backgrounds. To use, first install and then doubleclick .cape file (icon source:
View WhiteIBeam1.cape
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Vincent Hoogendoorn</string>
VincentH-Net / SharpSvgImageSource.cs
Last active March 20, 2017 15:33
Temporary fix for unsharp SVG's in FFImageLoading
View SharpSvgImageSource.cs
using FFImageLoading;
using FFImageLoading.Config;
using FFImageLoading.DataResolvers;
using FFImageLoading.Forms;
using FFImageLoading.Svg.Platform;
using FFImageLoading.Work;
using SkiaSharp;
using System;
using System.IO;
using System.Reflection;
VincentH-Net / ApiModels2ViewModels.cs
Last active July 13, 2016 13:26
Backend For FrontEnd API for Xamarin Apps
View ApiModels2ViewModels.cs
using System.Threading.Tasks;
using PropertyChanged;
/// <summary>
/// See "Consuming the BFF API" in
/// </summary>
namespace MyApp.ApiModels
[ImplementPropertyChanged] // This will make all properties in all partial Contact classes data-bindable
public partial class Contact : ViewModelBase
VincentH-Net / FormsBinding.sketchcs.cs
Last active March 21, 2016 18:09
Xamarin Forms Sketch demonstrating data binding (without strings, to nested objects, to unlimited number of fields) and common app/sketch code. Note: remove the .cs from the file name, it is only there to make GitHub format it as C#
View FormsBinding.sketchcs.cs
using Xamarin.Forms;
// Additional guidance: see
// NOTE: Once support for creating classes is added to Xamarin Sketches,
// there is no need for this Tuple + enum + BindName + regular expression workaround;
// you can then simply create design data classes in the Sketch and bind to that using
// the same syntax in both projects and sketches, e.g.:
// SetBinding(..., (Person boundPerson) => boundPerson.Name)
// BindName helper function for use with binding to design data in Sketches.
VincentH-Net / KeyboardDismissGestureRecognizer.cs
Created January 10, 2014 13:52
KeyboardDismissGestureRecognizer automatically dismisses the onscreen keyboard in Xamarin.iOS when a user taps outside an editable view. Simply add a KeyboardDismissGestureRecognizer to your application's main window in FinishedLaunching.
View KeyboardDismissGestureRecognizer.cs
/// <summary>
/// To automatically dismiss the onscreen keyboard in iOS when a user taps outside an editable view,
/// add a KeyboardDismissGestureRecognizer to your application's main window in FinishedLaunching, e.g.:
/// Window.AddGestureRecognizer(new KeyboardDismissGestureRecognizer());
/// </summary>
public class KeyboardDismissGestureRecognizer : UITapGestureRecognizer
public KeyboardDismissGestureRecognizer() : base(() => { }) { CancelsTouchesInView = false; }
public override void TouchesBegan(NSSet touches, UIEvent evt)
VincentH-Net / OrderResultView.axml
Created October 24, 2013 12:37
OrderResult view markup for Android Cloud Auction example app, built with MvvmQuickCross
View OrderResultView.axml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android=""
VincentH-Net / TextListItem.axml
Created October 24, 2013 09:23
Simple text list item view markup for Android Cloud Auction example app, built with MvvmQuickCross
View TextListItem.axml
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android=""
android:layout_height="wrap_content" />
VincentH-Net / OrderView.axml
Created October 24, 2013 08:45
Order view markup for Android Cloud Auction example app, built with MvvmQuickCross
View OrderView.axml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android=""