Skip to content

Instantly share code, notes, and snippets.

View oddbear's full-sized avatar

Oddbjørn Bakke oddbear

View GitHub Profile
@oddbear
oddbear / svgconvert.py
Created June 26, 2016 11:35
Python script to convert SVG to PNG for Xamarin, using svgexport
import os
from subprocess import call
# npm install svgexport -g
androidBasePath = "../Droid/Resources/"
iosBasePath = "../iOS/Resources/"
files = [
("buttonNormal", (40, 40), (40, 40)),
@oddbear
oddbear / XF_2_3_3_ListView_iOS_bugs.cs
Created November 29, 2016 16:03
Some bugs in Xamarin Forms 2.3.3
public class ListViewPage : ContentPage
{
//Tree bugs (iOS):
//1. Important. If spinner is running, and you press the Entry, then the listview will get unaligned.
// to reproduce. Just start the project, click the entry, and then click the Refresh button.
//2. If changeExecute is changed while running, it will kill the spinner.
// to reproduce use pull to refresh, and se that the spinner disapairs before the list is updated.
//3. If can execute returns false, the spinner will start, but the command will never execute.
// to reproduce, just uncomment "_canExecute = true;" and do a pull to refresh.
@oddbear
oddbear / ShortCircuit.cs
Created November 25, 2016 11:53
A Xamarin.Forms (2.3.2) hack, that short circuit the layout system.
public class PresenterTest : ContentPresenter
{
BoxView _testView;
public PresenterTest()
{
_testView = new BoxView {
BackgroundColor = Color.Red,
WidthRequest = 30,
HorizontalOptions = LayoutOptions.Fill,