Skip to content

Instantly share code, notes, and snippets.

@jamesmontemagno
jamesmontemagno / MvxUIRefreshControl
Created August 23, 2013 19:36
MvvmCross Implementation of UIRefreshControl that you can use inside of TableViews or CollectionViews
using System;
using MonoTouch.UIKit;
using System.Windows.Input;
namespace com.refractored.mvxbindings
{
/// <summary>
/// Mvx user interface refresh control.
/// </summary>
public class MvxUIRefreshControl : UIRefreshControl
<?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="MyFirstOouiApp.Pages.MyPage">
<ContentPage.Content>
<StackLayout>
<Label Text="Hello World" FontSize="Large"
HorizontalOptions="Center" HorizontalTextAlignment="Center"/>
<Button Text="Click Me!!!" Clicked="Handle_Clicked" HeightRequest="50"/>
</StackLayout>
@jamesmontemagno
jamesmontemagno / 1MasterPage.cs
Last active January 14, 2020 20:14
Simple example of using the messaging center.
public ObservableCollection<TripExpense> Expenses { get; set; }
public ExpensesViewModel()
{
Expenses = new ObservableCollection<TripExpense>();
//Subscibe to insert expenses
MessagingCenter.Subscribe<TripExpense>(this, "AddNew", (expense) =>
{
Expenses.Add(expense);
using System;
using Xamarin.Forms;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
namespace LoadMoreBottom
{
public class App : Application
{

Hey! Are you going to Build? We should hang out.

Let's grab a coffee, chat over lunch, and take some of our sweet Merge Conflict stickers!

Sunday

Monday

  • 12 - 1PM: LUNCH with CDAs/Xamarins: Find our cool signs in the lunch area
  • 2:00 - 2:20 PM: SESSION THR2438 Start building mobile apps in 5 minutes with Xamarin Live Player
<Project Sdk="MSBuild.Sdk.Extras/2.0.29">
<PropertyGroup>
<!--Update with your target such as: Xamarin.iOS10 or MonoAndroid80 or Xamarin.Mac20-->
<TargetFramework>Xamarin.iOS10</TargetFramework>
<!--To Multi-target you can do this-->
<!--<TargetFrameworks>Xamarin.iOS10;MonoAndroid80</TargetFrameworks>-->
var eventAsObservable = Observable.FromEvent<PropertyChangedEventHandler, PropertyChangedEventArgs>(
ev => this.PropertyChanged += ev,
ev => this.PropertyChanged -= ev)
.Where((e, b) => e.PropertyName == nameof(Text));
eventAsObservable
.Throttle(TimeSpan.FromMilliseconds(250))
.Subscribe(e =>
{
//do stuff
=== Visual Studio Community 2019 for Mac ===
Version 8.0.4 (build 0)
Installation UUID: 6289573f-1da9-40b9-a50a-33e7dfcbb82b
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.6.0.2 (d16-0 / 040682909)
Package version: 518010003
=== Mono Framework MDK ===
@jamesmontemagno
jamesmontemagno / MvxSwipeRefreshLayout.cs
Last active April 8, 2019 13:03
MvvmCross Implementation of SwipleRefreshLayout for Xamarin.Android
public class MvxSwipeRefreshLayout : SwipeRefreshLayout
{
/// <summary>
/// Gets or sets the refresh command.
/// </summary>
/// <value>The refresh command.</value>
public ICommand RefreshCommand { get; set;}
public MvxSwipeRefreshLayout(Context context, IAttributeSet attrs)
: base(context, attrs)
inting3D.Printing3DContract.winmd" /reference:"C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0\Windows
.Networking.Connectivity.WwanContract\1.0.0.0\Windows.Networking.Connectivity.WwanContract.winmd" /reference:"C:\Prog
ram Files (x86)\Windows Kits\10\References\10.0.16299.0\Windows.Services.Store.StoreContract\2.0.0.0\Windows.Services
.Store.StoreContract.winmd" /reference:"C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0\Windows.Servic
es.TargetedContent.TargetedContentContract\1.0.0.0\Windows.Services.TargetedContent.TargetedContentContract.winmd" /r
eference:"C:\Program Files (x86)\Windows Kits\10\References\10.0.16299.0\Windows.System.Profile.ProfileHardwareTokenC
ontract\1.0.0.0\Windows.System.Profile.ProfileHardwareTokenContract.winmd" /reference:"C:\Program Files (x86)\Windows
Kits\10\References\10.0.16299.0\Windows.System.Profile.ProfileSharedModeContract\2.0.0.0\Windows.System.Profile.Prof
ileSharedModeContract.winmd" /reference:"C:\Program Files (x86