Skip to content

Instantly share code, notes, and snippets.

View TBertuzzi's full-sized avatar
👨‍💻
Works on My Device 📱

Thiago Bertuzzi TBertuzzi

👨‍💻
Works on My Device 📱
View GitHub Profile
public async Task Loading()
{
// Loading settings
Configurations.LoadingConfig = new LoadingConfig
{
IndicatorColor = Color.White,
OverlayColor = Color.Black,
Opacity = 0.4,
DefaultMessage = "Carregando (Uma hora acaba)...",
};
@TBertuzzi
TBertuzzi / MainPage.xaml
Last active January 20, 2022 13:50
AiForms
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
Padding="0,60,0,0"
x:Class="XamarinFormsAiFormsDialogs.MainPage">
<StackLayout>
<Frame BackgroundColor="#2196F3" Padding="24" CornerRadius="0">
<Label Text="Vamos utilizar o AiForms.Dialogs" HorizontalTextAlignment="Center" TextColor="White" FontSize="36"/>
</Frame>
using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.OS;
namespace XamarinFormsAiFormsDialogs.Droid
{
[Activity(Label = "XamarinFormsAiFormsDialogs", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize )]
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace XamarinFormsAiFormsDialogs.iOS
{
[Register("AppDelegate")]
@TBertuzzi
TBertuzzi / MessageViewModel.cs
Created January 13, 2022 19:19
XamarinFormsEventAggregator
using System;
using System.Threading.Tasks;
using MvvmHelpers;
using Xamarin.Forms.EventAggregator;
using XamarinFormsEventAggregatorSample.Events;
namespace XamarinFormsEventAggregatorSample.ViewModels
{
public class MessageViewModel : BaseViewModel
{
@TBertuzzi
TBertuzzi / MessagePage.xaml
Created January 13, 2022 19:18
XamarinFormsEventAggregator
<?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="XamarinFormsEventAggregatorSample.MessagePage">
<ContentPage.Content>
<StackLayout>
<Frame BackgroundColor="#2196F3" Padding="24" CornerRadius="0">
<Label Text="EventAggregator" HorizontalTextAlignment="Center" TextColor="White" FontSize="36"/>
</Frame>
@TBertuzzi
TBertuzzi / MainViewModel.cs
Created January 13, 2022 19:14
XamarinFormsEventAggregator
using System;
using System.Threading.Tasks;
using MvvmHelpers;
using Xamarin.Forms.EventAggregator;
using XamarinFormsEventAggregatorSample.Events;
namespace XamarinFormsEventAggregatorSample.ViewModels
{
public class MainViewModel : BaseViewModel
{
@TBertuzzi
TBertuzzi / MainPage.xaml
Created January 13, 2022 19:13
XamarinFormsEventAggregator
<?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="XamarinFormsEventAggregatorSample.MainPage">
<StackLayout>
<Frame BackgroundColor="#2196F3" Padding="24" CornerRadius="0">
<Label Text="EventAggregator" HorizontalTextAlignment="Center" TextColor="White" FontSize="36"/>
</Frame>
<Label Text="Write a message on the other screen and go back" FontSize="Title" Padding="{StaticResource SamplePadding}"/>
@TBertuzzi
TBertuzzi / TextMessage.cs
Created January 13, 2022 19:11
EventAggregator
using System;
namespace XamarinFormsEventAggregatorSample.Events
{
public class TextMessage
{
public string Text { get; set; }
}
}
@TBertuzzi
TBertuzzi / MainPage.xaml
Last active January 13, 2022 18:40
OverFlower
<?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:over="clr-namespace:OverFlower;assembly=OverFlower"
Padding="0,60,0,0"
x:Class="OverFlowerExemplo.MainPage">
<StackLayout Margin="0,32,0,0"
HorizontalOptions="Center"