Skip to content

Instantly share code, notes, and snippets.

@lambda125
lambda125 / ResX-ResW.tt
Created September 24, 2015 13:48
Cross-platform Text localisation for mobile apps - F# version (RESX + T4 + C# + F#)
// For a sample resx, and the ResX-ResW converter T4 template,
// see: https://gist.github.com/krishna-nadiminti/844fe77c9722374a2fb5
@lambda125
lambda125 / IResourceLoader.cs
Created September 24, 2015 13:23
Cross-platform Text localisation for mobile apps (RESX + T4 + C# + RESW/XML)
public interface IResourceLoader
{
string GetResource(string resourceKey);
bool IsLocalisedResource(string resourceKey);
}
@lambda125
lambda125 / About_VS2015.txt
Created August 8, 2015 10:53
My VS 2015 Environment (8 Aug 2015)
Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00079
Installed Version: Enterprise
Architecture and Modeling Tools 00322-80000-00000-AA727
Microsoft Architecture and Modeling Tools
@lambda125
lambda125 / Win8 app crash due to Telerik controls
Created April 26, 2013 05:12
Telerik exception: Win8 C# / XAML app crash. Using HubTile. Version: 2013.1.219.45
The application crashed: System.NullReferenceException
at Telerik.UI.Xaml.Controls.Primitives.TiltInteractionEffect.ApplyTilt(FrameworkElement element, Point manipulationPoint)
at Telerik.UI.Xaml.Controls.Primitives.TiltInteractionEffect.OnElementPointerMoved(Object sender, PointerRoutedEventArgs args)
@lambda125
lambda125 / AppBarButtonDeclaration.xaml
Created October 13, 2012 12:36
Vector path data for app bar buttons - the hard way
<Button Style="{Binding StyleKey, Converter={StaticResource KeyToResourceConverter}}"
AutomationProperties.Name="{Binding Label}"
Tag="{Binding Label}"
Command="{Binding Command}" />
@lambda125
lambda125 / GridView.xaml
Created September 6, 2012 13:55
GridView ItemClick handling
<GridView ItemClick="OnDetailItemClick"
ItemsSource="{Binding RandomStrings}" />
@lambda125
lambda125 / WebViewHostSample.xaml
Created September 2, 2012 09:43
Using the webview wrapper control to display content from a URL with fallback local content
<Page
x:Class="Metro.Controls.Demo.Samples.WebViewHostSample"
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:MetroControls="using:MetroControls"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<Grid>
@lambda125
lambda125 / WebViewHostControl.xaml
Created September 2, 2012 08:44
Web browser control
<UserControl
x:Class="MetroControls.WebViewHostControl"
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:Converters="using:Metro.Controls.Converters" mc:Ignorable="d"
d:DesignHeight="768"
d:DesignWidth="320"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
@lambda125
lambda125 / App.xaml
Created July 29, 2012 06:03
Trying to override the Menu brushes in Callisto
<Application x:Class="Test.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!--
Styles that define common aspects of the platform look and feel