Skip to content

Instantly share code, notes, and snippets.

View softlion's full-sized avatar

ZeBen softlion

View GitHub Profile
@softlion
softlion / RxButton.cs
Last active April 18, 2024 04:27
Button with HorizontalTextAlignmentProperty and VerticalTextAlignmentProperty
using Microsoft.Maui.Handlers;
#if ANDROID
using Google.Android.Material.Button;
#elif IOS
using UIKit;
#elif WINDOWS
using Microsoft.UI.Xaml.Controls;
#endif
@softlion
softlion / SkottieView.cs
Created March 8, 2024 20:17
SkottieView for Maui (replaces LottieXamarin)
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Reflection;
using SkiaSharp;
using SkiaSharp.Views.Maui;
using Animation = SkiaSharp.Skottie.Animation;
namespace Skottie;
/// <summary>
@softlion
softlion / azure-pipeline.yaml
Created February 20, 2024 17:05
Build a xamarin iOS app for release and publish it to testflight via AppCenter Distribute
# Xamarin.iOS
# Build a Xamarin.iOS project.
# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/xamarin
trigger:
- release/store
pool:
vmImage: 'macos-latest'
@softlion
softlion / IScreenLocation.cs
Last active February 6, 2022 10:58
Xamarin Forms get absolute bounds of a control and display a menu at this location
namespace Vapolia
{
public interface IScreenLocation
{
PointF GetCoordinates(VisualElement view);
}
}
@softlion
softlion / MvxRadioGroupSelectedIndexBinding.cs
Last active May 13, 2021 18:59
mvvmcross : Bind a static RadioGroup using zero based indexes
/// <summary>
/// Author: softlion (softlion@softlion.com)
/// </summary>
/// <remarks>
/// Thanks to: Stuart Lodge
/// </remarks>
public class MvxRadioGroupSelectedIndexBinding : MvxAndroidTargetBinding
{
bool stopListeningCheckChanged = false;
@softlion
softlion / MyTabbedRenderer.Droid.cs
Last active September 29, 2020 05:14
Custom Tabbed Renderer for Xamarin Forms to display Svg icons using XamSvg
using System.Threading;
using Android.App;
using Android.Graphics;
using Android.OS;
using Android.Util;
using Android.Views;
using Vapolia.Droid.Lib.Renderers;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
using XamSvg;
@softlion
softlion / connect_linkedin.js
Created November 13, 2019 15:08 — forked from bertolo1988/connect_linkedin.js
Quickly your LinkedIn network
// 1. load https://www.linkedin.com/mynetwork/
// 2. make sure your LinkedIn is in English
// 3. paste this script on chrome dev tools at your own risk
async function moreConnectionsPlease() {
// maximum limit of Connect buttons clicked
const LIMIT = 500;
// wait in ms before each scroll
const SCROLL_TIMEOUT = 600;
// bulk scroll will scroll this amount of times
@softlion
softlion / ShimmerExtensions.cs
Created October 14, 2019 13:48
Xamarin Shimmer
//Xamarin iOS
using System;
using System.Runtime.InteropServices;
using CoreAnimation;
using CoreGraphics;
using Foundation;
using UIKit;
namespace Vapolia.Ios.Lib.Ui
{
@softlion
softlion / RealtimeBlurView.cs
Created February 25, 2019 13:26
Xamarin RealtimeBlurView
using System;
using Android.App;
using Android.Content;
using Android.Content.Res;
using Android.Graphics;
using Android.Renderscripts;
using Android.Runtime;
using Android.Util;
using Android.Views;
using R = VfrApp.Droid.Resource;
@softlion
softlion / log vs2017.txt
Last active November 28, 2018 08:10
Infos
Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the NuGet Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
Running restore with 8 concurrent jobs.
Reading project file C:\Dev\repos\Company\Company.AirAppApp\AirApp.Core\AirApp.csproj.
Reading project file C:\Dev\repos\Company\Company.AirAppApp\AirApp.Droid\AirApp.Droid.csproj.
Reading project file C:\Dev\repos\Company\Company.AirAppApp\Company2.Toolbox\Company2.Toolbox.csproj.
Reading project file C:\Dev\repos\Company\Company.AirAppApp\AirApp.iOS\AirApp.iOS.csproj.
The restore inputs for 'Company2.Toolbox' have not changed. No further actions are required to complete the restore.
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: C:\Dev\repos\Company\Company.AirAppApp\Company2.Toolbox\obj\project.assets.json