Skip to content

Instantly share code, notes, and snippets.

🎧
building apps

Ed Snider edsnider

🎧
building apps
Block or report user

Report or block edsnider

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@edsnider
edsnider / SomeView.cs
Last active Aug 11, 2017
MvvmCross UIView Tap Command Binding
View SomeView.cs
var set = this.CreateBindingSet<SomeView, SomeViewModel>();
// Use UIView Tap extension method in Cirrious.MvvmCross.Binding.Touch.Views.Gestures:
set.Bind (whateverLabel.Tap ())
.For (v => v.Command)
.To (vm => vm.WhateverCommand);
set.Apply();
@edsnider
edsnider / versionnumbers.rb
Created Jul 22, 2015
Get APK and IPA version numbers with Ruby
View versionnumbers.rb
require 'ruby_apk'
require 'read_ipa'
# read version info from APK
apk = Android::Apk.new('<APK_FILENAME>.apk')
puts apk.manifest.version_name
puts apk.manifest.version_code
# read version info from IPA
@edsnider
edsnider / StaticTabs.xaml
Last active Aug 29, 2015
Static tabs in a Xamarin.Forms TabbedPage
View StaticTabs.xaml
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="StaticTabbedPageSample.Views.StaticTabs"
Title="Static Tabs Sample">
<TabbedPage.Children>
<ContentPage Title="Tab 1">
<StackLayout Orientation="Vertical" Padding="10,0">
<Label Text="This is the content for the first tab" />
<Button Text="Click here" />
@edsnider
edsnider / Beer.cs
Last active Aug 29, 2015
Windows Phone 8.1 SemanticZoom
View Beer.cs
namespace BeerGroups.Core.Models
{
public class Beer
{
public string Name { get; set; }
public string Brewery { get; set; }
public string Style { get; set; }
}
}
@edsnider
edsnider / BaseViewModel.cs
Last active Aug 29, 2015
Clearing WP back stack in MvvmCross
View BaseViewModel.cs
namespace MyApp.Portable.ViewModels
{
public class BaseViewModel : MvxViewModel
{
protected void ShowViewModelAndClearBackStack<TViewModel>()
where TViewModel : BaseViewModel
{
ShowViewModel<TViewModel>();
ChangePresentation(new ClearNavBackStackHint());
}
You can’t perform that action at this time.