Skip to content

Instantly share code, notes, and snippets.

View stackunderflows's full-sized avatar

Mike Rampanelli stackunderflows

  • Grand Rapids, MI
View GitHub Profile
@stackunderflows
stackunderflows / MainPage.xaml
Last active June 21, 2019 11:23
Xamarin - Use responsive breakpoints to have different property values depending on phone size and platform
<!-- Inspired from http://dkdevelopment.net/2018/06/24/xamarin-forms-responsive-xaml-properties/ -->
<?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="MyApp.MainPage"
xmlns:extensions="clr-namespace:MyApp.Extensions;assembly=MyApp">
<ContentPage.Resources>
<!--Do it as part of a style-->
<Style x:Key="ButtonLayoutStyle" TargetType="StackLayout">
<Setter Property="Spacing">
@stackunderflows
stackunderflows / Android_CustomFrameRenderer.cs
Created May 23, 2019 17:09
Customized Xamarin.Forms Frame that allows you to specify individual corners to round.
using Android.Content;
using Android.Graphics.Drawables;
using MyApp.Controls;
using MyApp.Droid.Renderers;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ExportRenderer(typeof(CustomFrame), typeof(CustomFrameRenderer))]
namespace MyApp.Droid.Renderers
{
@stackunderflows
stackunderflows / UltimayteEntryPage.xaml
Last active January 27, 2020 18:03
Floating label example
<?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:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
xmlns:local="clr-namespace:PhantomLib"
xmlns:extensions="clr-namespace:PhantomLib.Extensions;assembly=PhantomLib"
xmlns:controls="clr-namespace:PhantomLib.CustomControls;assembly=PhantomLib"
xmlns:effects="clr-namespace:PhantomLib.Effects;assembly=PhantomLib"
xmlns:behaviors="clr-namespace:PhantomLib.Behaviors;assembly=PhantomLib"
xmlns:localvms="clr-namespace:PhantomLibSamples.ViewModels;assembly=PhantomLibSamples"
@stackunderflows
stackunderflows / UltimatEntryPage.xaml
Created January 27, 2020 18:36
UltimateEntry with clear button
<?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:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
xmlns:local="clr-namespace:PhantomLib"
xmlns:extensions="clr-namespace:PhantomLib.Extensions;assembly=PhantomLib"
xmlns:controls="clr-namespace:PhantomLib.CustomControls;assembly=PhantomLib"
xmlns:effects="clr-namespace:PhantomLib.Effects;assembly=PhantomLib"
xmlns:behaviors="clr-namespace:PhantomLib.Behaviors;assembly=PhantomLib"
xmlns:localvms="clr-namespace:PhantomLibSamples.ViewModels;assembly=PhantomLibSamples"
@stackunderflows
stackunderflows / UltimatEntryPage.xaml
Created January 31, 2020 16:09
Password show/hide
<controls:UltimateEntry Style="{StaticResource MaterialEntry}"
ImageSource="icon_lock_open"
HidePasswordImageSource="icon_lock_close"
ImageButton="Password"
ReturnButton="Done" />
@stackunderflows
stackunderflows / UltimatEntryPage.xaml
Created January 31, 2020 17:53
Material design Entry
<controls:UltimateEntry Placeholder="Country"
UnderlineColor="{DynamicResource AccentColor}"
Style="{StaticResource NonMaterialEntry}" />
@stackunderflows
stackunderflows / UltimatEntryPage.xaml
Created February 13, 2020 20:14
Using the ReturnButton
<?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:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
xmlns:local="clr-namespace:PhantomLib"
xmlns:extensions="clr-namespace:PhantomLib.Extensions;assembly=PhantomLib"
xmlns:controls="clr-namespace:PhantomLib.CustomControls;assembly=PhantomLib"
xmlns:effects="clr-namespace:PhantomLib.Effects;assembly=PhantomLib"
xmlns:behaviors="clr-namespace:PhantomLib.Behaviors;assembly=PhantomLib"
xmlns:localvms="clr-namespace:PhantomLibSamples.ViewModels;assembly=PhantomLibSamples"