Skip to content

Instantly share code, notes, and snippets.

View amay077's full-sized avatar
🏠
Working from home

amay077 amay077

🏠
Working from home
View GitHub Profile
using System;
using Xamarin.Forms;
namespace SpacingTest
{
public class App
{
public static Page GetMainPage()
{
return new ContentPage
@amay077
amay077 / MainActivity.cs
Created December 10, 2014 05:15
simply_shape_moving_by_xamarin_with_rx
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using System.Reactive.Linq;
using NDebug = System.Diagnostics.Debug;
@amay077
amay077 / rxprop.snippet
Last active January 7, 2016 12:14
Generate ReactiveProperty and ReactiveCommand code template for Xamarin Studio
public ReactiveProperty<$type$> $name$ { get; } = new ReactiveProperty<$type$>();
@amay077
amay077 / zdk.fs
Last active March 16, 2016 16:32 — forked from bleis-tift/zdk.fs
ズンドコキヨシ with F#
open System
type Sound = Z | D | K
with
override this.ToString() =
match this with
| Z -> "ズン"
| D -> "ドコ"
| K -> "キ・ヨ・シ!"
@amay077
amay077 / HowToUseMapKit.workbook
Created April 27, 2016 17:07
Xamarin Workbooks を使ってみるテスト。 ``HowToUseMapKit.workbook`` で保存して Xamarin Inspector で File->Open してね。
{"exec-mode":"default","platform":"iOS","uti":"com.xamarin.workbook","packages":[]}

Xamarin Workbooks を使って iOS アプリに地図を表示させてみよう

これは Xamarin Workbooks を使ってみるテストです。

この .workbook ファイルを、 Xamarin Inspector で File -> Open して再生すると iOS シミュレータで地図(MapKit)が表示できるはず。(あ、Mac でね)

@amay077
amay077 / MinLengthToDisableBehaviorSample.workbook
Last active July 5, 2016 12:38 — forked from ytabuchi/Xamarin.Forms.Workbooks
Xamarin Workbooks で、 Entry の文字数8文字以下で Button の IsEnabled を false にする Behavior を作ってみたサンプルです。
uti com.xamarin.workbook
platform iOS
packages
id version
Xamarin.Forms
2.2.0.31

Entry の文字数8文字以下で Button の IsEnabled を false にする Behavior

@amay077
amay077 / App.xaml
Created July 13, 2016 05:47
App.xaml
<Application
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="WorkingWithStyles.App">
<Application.Resources>
<ResourceDictionary>
<Color x:Key="Color1">#9CC9F5</Color>
<Color x:Key="Color2">#8CC9F5</Color>
<Color x:Key="LabelColor">{StaticResource Color1}</Color>
@amay077
amay077 / CustomBackButtonMasterDetailEffect.cs
Last active July 20, 2016 16:02
Xamarin.Forms の MasterDetailPage の左上ボタンをカスタマイズする Effect(iOSのみ)
using System;
using System.Collections.Generic;
using System.Linq;
using UIKit;
using NavigationSample.iOS;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ResolutionGroupName("mycompany")]
[assembly: ExportEffect(typeof(CustomBackButtonMasterDetailEffect), "CustomBackButtonMasterDetailEffect")]
@amay077
amay077 / XFGoogleMapSample.csproj
Created December 16, 2016 10:02
ビルド前イベントで「特定のファイルが無ければコピーする」を Win:Visual Studio/Mac:Xamarin Studio(Visual Studio for Mac) で行う。< PreBuildEvent > を見てね。
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E5FEBCA7-6127-4002-B7B3-3EE4CC362B25}</ProjectGuid>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<UseMSBuildEngine>true</UseMSBuildEngine>
<OutputType>Library</OutputType>
<RootNamespace>XFGoogleMapSample</RootNamespace>
@amay077
amay077 / <= Forms 2.3.2
Created January 11, 2017 12:43 — forked from jimmgarrido/AdjustResize.md
AdjustResize Workaround for Xamarin.Forms
protected override void OnCreate(Bundle bundle)
{
ToolbarResource = Resource.Layout.toolbar;
TabLayoutResource = Resource.Layout.tabs;
base.OnCreate(bundle);
Window.SetSoftInputMode(SoftInput.AdjustResize);
if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
{