This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomCollectionViewRenderer : GroupableItemsViewRenderer<CustomCollectionView, GroupableItemsViewController<CustomCollectionView>> | |
{ | |
ItemsViewLayout _layout; | |
protected override ItemsViewLayout SelectLayout() | |
{ | |
var itemSizingStrategy = ItemsView.ItemSizingStrategy; | |
var itemsLayout = ItemsView.ItemsLayout; | |
if (itemsLayout is GridItemsLayout gridLayout) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Collections.Specialized; | |
using System.ComponentModel; | |
using System.Linq; | |
namespace Example | |
{ | |
public class SmartObservableCollection<T> : ObservableCollection<T> | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using System.Runtime.CompilerServices; | |
using Xamarin.Forms; | |
namespace App.Controls | |
{ | |
public class AdjustedContainer : ContentView | |
{ | |
public static readonly BindableProperty MinWidthProperty = BindableProperty.Create(nameof(MinWidth), typeof(AdjustedSize), typeof(AdjustedContainer), AdjustedSize.Auto); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public TestView : View | |
{ | |
private static void OnItemSourceChanged(BindableObject bindable, object oldvalue, object newvalue) | |
{ | |
var self = (TestView) bindable; | |
var oldCollection = oldvalue as INotifyCollectionChanged; | |
var newCollection = newvalue as INotifyCollectionChanged; | |
if (oldCollection != null) | |
oldCollection.CollectionChanged -= self.OnItemSourceCollectionChanged; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override bool OnTouchEvent(MotionEvent e) | |
{ | |
switch(e.Action) | |
{ | |
case MotionEventActions.Down: | |
case MotionEventActions.PointerDown: | |
case MotionEventActions.Pointer2Down: | |
if(Element?.Content != null && IsHorizontalScrollStarted()) | |
Parent?.RequestDisallowInterceptTouchEvent(true); | |
break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows.Input; | |
using Xamarin.Forms; | |
using System; | |
using System.ComponentModel; | |
using Scandit.BarcodePicker.Unified.Abstractions; | |
namespace ProjectName.Controls.BarcodeScanner | |
{ | |
public class BarcodePickerView : View | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel; | |
using CoreFoundation; | |
using Foundation; | |
using Rg.Forms.Enumerables.Device; | |
using Rg.Forms.Events.Device; | |
using Rg.Forms.Extensions.Device; | |
using Rg.Forms.iOS.Extensions.Device; | |
using Rg.Forms.iOS.Renderers.Pages; | |
using Rg.Forms.Interfaces.Contracts.Services.Device; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Lottie.Forms; | |
using Xamarin.Forms; | |
namespace Shping.Controls.Lottie | |
{ | |
public class LottieAnimationView : AnimationView | |
{ | |
public static readonly BindableProperty AssetFolderProperty = BindableProperty.Create(nameof(AssetFolder), typeof(string), typeof(LottieAnimationView)); | |
public string AssetFolder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Android.App; | |
using Android.Content; | |
using Android.Graphics; |
NewerOlder