Skip to content

Instantly share code, notes, and snippets.

View juucustodio's full-sized avatar

Juliano Custódio juucustodio

View GitHub Profile
using System;
using System.Collections;
using System.Linq;
using Xamarin.Forms;
namespace DemoCarouselView
{
public class IndicadoresCarousel : Grid
{
private ImageSource UnselectedImageSource = null;
using System.Collections.Generic;
using System.ComponentModel;
using Xamarin.Forms;
namespace DemoCarouselView
{
public partial class IndicadoresPage : ContentPage, INotifyPropertyChanged
{
public IndicadoresPage()
{
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:local="clr-namespace:DemoCarouselView"
xmlns:forms="clr-namespace:Xamarin.Forms;assembly=Xamarin.Forms.CarouselView"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="DemoCarouselView.IndicadoresPage">
<StackLayout>
<forms:CarouselView x:Name="ImageCarouselView" Position="{Binding Position, Mode=TwoWay}"
ItemsSource="{Binding ListaImagens}" >
@juucustodio
juucustodio / App.xaml.cs
Created June 24, 2017 19:05
Exemplo para ativar o XamlCompilation a nível da classe.
using Xamarin.Forms.Xaml;
namespace MeuApp
{
[XamlCompilation (XamlCompilationOptions.Compile)]
public class HomePage : ContentPage
{
...
}
}
@juucustodio
juucustodio / App.xaml.cs
Last active June 26, 2017 13:35
Exemplo para ativar o XamlCompilation a nível de aplicação.
using Xamarin.Forms.Xaml;
...
[assembly: XamlCompilation (XamlCompilationOptions.Compile)]
namespace MeuApp
{
...
}
@juucustodio
juucustodio / Demo.Android.csproj
Last active June 26, 2017 20:08
Ativando o AOT no projeto Android.
...
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
...
<AotAssemblies>true</AotAssemblies>
...
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
...
<AotAssemblies>true</AotAssemblies>
...
@juucustodio
juucustodio / DemoLoading.xaml.cs
Last active July 7, 2017 20:18
Exemplo de Loading - Código realizado no Code-Behind
using System;
using System.ComponentModel;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace DemoLoading
{
public partial class MainPage : ContentPage, INotifyPropertyChanged
{
public MainPage()
@juucustodio
juucustodio / DemoLoadingPage.xaml
Last active July 12, 2017 17:49
Exemplo de Loading - Código xaml.
<?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:local="clr-namespace:DemoLoading"
x:Class="DemoLoading.DemoLoadingPage" >
<StackLayout >
<Button x:Name="botao" Clicked="Show" Text="Login" TextColor="White" BackgroundColor="#3b5998" Margin="10,30,10,30"/>
<ActivityIndicator x:Name="actInd"
IsRunning="{Binding IsLoading}"
@juucustodio
juucustodio / MainPageDemoGPS.xaml
Last active August 7, 2017 14:36
Demo de utilização do GPS - Xamarin.Forms
<?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:local="clr-namespace:DemoGPS"
x:Class="DemoGPS.MainPageDemoGPS">
<StackLayout Margin="0,25,0,0">
<Button Text="Localização" Clicked="GetPosition" BackgroundColor="#EEE" />
<Label Text="Latitude" FontSize="20" HorizontalOptions="CenterAndExpand" />
<Label x:Name="LatitudeLabel" FontSize="30" HorizontalOptions="CenterAndExpand" />
@juucustodio
juucustodio / MainPageDemoGPS.xaml.cs
Created August 7, 2017 14:36
Demo de utilização do GPS - Xamarin.Forms
using Plugin.Geolocator;
using System;
using Xamarin.Forms;
namespace DemoGPS
{
public partial class MainPageDemoGPS : ContentPage
{
public MainPageDemoGPS()
{