Skip to content

Instantly share code, notes, and snippets.

View pictos's full-sized avatar
🐒
Creating tools for you

Pedro Jesus pictos

🐒
Creating tools for you
  • Brasil
View GitHub Profile
@pictos
pictos / VLCService.cs
Created August 13, 2021 00:07
VLCService
using LibVLCSharp.Shared;
using static MediaPlayerX.Helpers.GlobalResources;
using MediaPlayerX.Models;
using System;
using System.Threading.Tasks;
using Xamarin.Forms;
using MediaPlayerX.Helpers;
using System.Collections.ObjectModel;
@pictos
pictos / CornerRadiusXCT.cs
Created May 24, 2021 22:45
Spec to using an Attached property
public class CornerRadiusEffect
{
public static readonly BindableProperty CornerRadiusProperty = BindableProperty.CreateAttached(
nameof(CornerRadius),
typeof(CornerRadius),
typeof(CornerRadiusEffect),
default(CornerRadius),
propertyChanged: OnCornerRadiusPropertyChanged);
static void OnCornerRadiusPropertyChanged(BindableObject bindable, object oldValue, object newValue)
using System;
namespace WeakTest
{
class Program
{
static WeakReference<SomeClass> myClass;
static SomeClass holder;
static void Main(string[] args)
using Android.App;
using Android.Content;
using Android.Content.Res;
using Android.Graphics.Drawables;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Google.Android.Material.BottomNavigation;
using ShellBox.Droid;
<?xml version="1.0" encoding="utf-8" ?>
<Shell
x:Class="Xamarin.Forms.Controls.MyShell"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Xamarin.Forms.Controls.Issues">
<Shell.FlyoutContentTemplate>
<DataTemplate>
<ScrollView>
@pictos
pictos / PointHashCode.cs
Last active July 16, 2020 01:06
exemplo de implementações de hashcode
public struct Point
{
public int X {get;}
public int Y {get;}
// Usando ValueTuple
public override int GetHashCode()
{
return (X, Y).GetHashCode();
@pictos
pictos / RemovePage.cs
Created July 7, 2020 22:23
Work around to use remove page with XF
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Foundation;
using RemovePageReproduction.iOS;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Internals;
using BenchmarkDotNet.Attributes;
using Microsoft.Diagnostics.Tracing.Parsers.Clr;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BenchmarkDotNet.Samples.Forms
{
{
//Original code https://github.com/Clancey/Comet.Tasky/tree/master/.vscode
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"preLaunchTask": "build",
@pictos
pictos / tasks.json
Created November 11, 2019 18:06
Task file for comet debbuger.
{
// Original code https://github.com/Clancey/Comet.Tasky/tree/master/.vscode
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "comet",
"group": {