Skip to content

Instantly share code, notes, and snippets.

View StephaneDelcroix's full-sized avatar

Stephane Delcroix StephaneDelcroix

View GitHub Profile
* 42345ed82 - (HEAD -> master, origin/master, origin/HEAD) Merge branch '3.6.0' (13 hours ago) <Samantha Houts>
|\
| * a08e954ea - (origin/3.6.0, 3.6.0) Merge branch '3.5.0' into 3.6.0 (13 hours ago) <Samantha Houts>
| |\
| | * 0b7965f81 - [iOS, Android] Prevent NREs in ScrollViews (#5383) (13 hours ago) <Samantha Houts>
| * | de0ac02b5 - Allow SelectableItemsViewRenderer/Adapted to deselect ViewHolders not in the RecyclerView's child collection (#5358) (13 hours ago) <E.Z. Hart>
| * | c3ac500a1 - [X] more conv exception, bubble to previewer (#5400) (13 hours ago) <Stephane Delcroix>
| * | aef568a7c - [Android, iOS] added re-measure of TimePicker after change value (#4999) (13 hours ago) <Pavel Yakovlev>
* | | 24b4b554a - Merge branch '3.6.0' (14 hours ago) <ShaneN>
|\ \ \
@StephaneDelcroix
StephaneDelcroix / grid2.xaml
Last active November 21, 2018 09:00
Xamarin.Forms FlexLayout + CSS samples
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Xamarin.Forms.Controls.XamlPage">
<ContentPage.Resources>
<StyleSheet>
<![CDATA[
.section-title {
color: #778;
font-style: bold;
var platform = DependencyService.Get<NGraphics.IPlatform> ();
var size = new NGraphics.Size (280);
var canvas = platform.CreateImageCanvas (size, scale: 2);
canvas.SaveState ();
canvas.Scale (size);
canvas.Translate (1 / 8.0, 0);
var p = new Path ();
p.MoveTo (0, 1);
p.LineTo (0, 0);
double downPayment;
public double DownPayment {
get { return downPayement; }
set {
if (downPayement == value)
return;
downpAyement = value;
var eh = PropertyChanged;
if (eh != null)
eh (this, new PropertyChangedEventArgs ("DownPayement"));
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:i18n="clr-namespace:Vernacular.Xaml;assembly=Vernacular.Catalog.XamarinForms"
x:Class="Vernacular.Sample.LoginPage"
BackgroundColor="Silver"
i18n:Catalog.Message="Hello">
<StackLayout Orientation="Vertical" Spacing="20" Padding="20">
<Label i18n:Catalog.Message="Hello" />
<Entry Text="{Binding Email}" x:Name="emailEntry"/>
var label = new Label ();
if ( n == 1)
label.Text = label.Text = string.Format ("{0} item in your basket.", n);
else
label.Text = label.Text = string.Format ("{0} items in your basket.", n);
var label = new Label ();
label.Text = label.Text = string.Format ("{0} item(s) in your basket.", n);
var label = new Label ();
label.Text = label.Text = string.Format ("{0} item{1} in your basket.", n, n==1? "" : "s");
protected override IEnumerable<Selector> Selectors ()
{
var regex = new Regex (@"^[+-]\[([\w]+)(\(\w+\))? ([\w:]+)].*$");
using (var reader = new System.IO.StreamReader("libcocos2d-i386.selectors")) {
string line;
while ((line = reader.ReadLine ()) != null) {
var match = regex.Match (line);
if (!match.Success)
continue;
//
// AsyncCollisionWaiter.cs
//
// Author:
// Stephane Delcroix <[email protected]>
//
// Copyright (c) 2013 S. Delcroix
//
using System;
using System.Threading.Tasks;