Skip to content

Instantly share code, notes, and snippets.

View JimmyPun610's full-sized avatar

Jimmy Pun JimmyPun610

View GitHub Profile
@JimmyPun610
JimmyPun610 / Mopups Accessibility fix.md
Last active February 20, 2024 02:36
Fixing Mopups Android Accessibility read by Talkback issue

In App.cs

   public App()
   {
        // .... All init methods....
#if ANDROID
        Mopups.Services.MopupService.Instance.Popped += Instance_Popped;
        Mopups.Services.MopupService.Instance.Pushed += Instance_Pushed;
#endif
   }
using deniszykov.BaseN;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using K4os.Text.BaseX;
namespace ConsoleApp2
{
internal class Program
@JimmyPun610
JimmyPun610 / PredicateBuilder.cs
Created June 23, 2022 00:39
C# PredicateBuilder
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace Extensions
{
public static class PredicateBuilder
{
@JimmyPun610
JimmyPun610 / SwipeDownToCloseXamarinFormPage.md
Last active May 4, 2023 09:20
Xamarin Form swipe to close page behaviour

To Implement swipe down to close behavior, we should attach the behavior to a view.

In XAML

<ContentView x:Name="ViewToMove">
   <ContentView.Behaviors>
     <behavior:SwipeDownToClosePopupPage  CloseAction="ClosePage" ParentView="{x:Reference ViewToMove}"/>  
   </ContentView.Behaviors>
</ContentView>
Package installation
Install-Package WebApiContrib.Core.Formatter.Bson -Version 2.1.0
Server side
  1. AllowSynchronousIO (optional)
//In Startup.cs
    public void ConfigureServices(IServiceCollection services)