Skip to content

Instantly share code, notes, and snippets.


Martin Suchan martinsuchan

View GitHub Profile
martinsuchan / Cursor.cs
Created Jul 18, 2017
CoreCursor attached property helper class.
View Cursor.cs
using System.Collections.Generic;
using System.Diagnostics;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Input;
namespace CursorTest
public class Cursor : DependencyObject
View Setting.cs
using System;
using System.Diagnostics;
using Windows.Storage;
namespace TinyCore.Storage
public abstract class SettingBase
/// <summary>
/// Access to LocalSettings must be atomic.
martinsuchan / MainPage.xam
Created Apr 20, 2016
Broken SecondaryCommands when using AppBarButton->Style
View MainPage.xam
<Page x:Class="App1.MainPage"
<SolidColorBrush x:Key="AppBarForegroundBrush" Color="DarkBlue"/>
<Style x:Key="MyAppBarButtonStyle" TargetType="AppBarButton">
martinsuchan / ScreenSizeHelper.cs
Created Jan 21, 2016
Lumia 950 and 950 XL screen size detection on WP8.1 Silverlight
View ScreenSizeHelper.cs
using System;
using System.Diagnostics;
using System.Linq;
using System.Windows;
using Microsoft.Phone.Info;
namespace PhoneApp1
public class ScreenSizeHelper
martinsuchan / Class1.cs
Created Jul 15, 2014
Visual Studio 14 CTP2 C# notes
View Class1.cs
using System;
// Using static
using System.Diagnostics.Debug;
using System.Math;
using System.Linq.Enumerable;
using System.Collections.Generic;
using Windows.Web.Http;
using System.Net.Http;
martinsuchan / MainPage.xaml
Created Feb 6, 2014
AppBarButton exceptions in Windows 8.1
View MainPage.xaml
<Page x:Class="BlankApp1.MainPage"
<!-- this works -->
<Style x:Key="Style1" TargetType="AppBarButton">
<Setter Property="Icon" Value="Previous" />
<!-- these throw exception -->
martinsuchan / MainPage.xaml.cs
Created Jan 11, 2014
Baseball Odds - different JSON parsing methods.
View MainPage.xaml.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.Serialization;
using System.Windows;
using System.Windows.Resources;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;