This file contains 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.Globalization; | |
using System.Linq; | |
using System.Windows; | |
using System.Windows.Data; | |
using System.Windows.Markup; | |
namespace MynameSpace | |
{ |
This file contains 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
################################################################################################# | |
# Checkout master, pull from master, prune master to remove branches that are merged with master | |
################################################################################################# | |
function gitcleanmaster(){ | |
git checkout master | |
git pull | |
git remote prune origin | |
git branch --merged | grep -v "\*" | xargs -rn 1 git branch -d | |
} |
This file contains 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
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:dblend="http://schemas.microsoft.com/expression/blend/2008" | |
mc:Ignorable="dblend" | |
dblend:DataContext="{dblend:DesignInstance $CLASSNAME$}" |
This file contains 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
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
d:DataContext="{d:DesignInstance $CLASSNAME$}" |
This file contains 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
/// <summary> | |
/// A rounded frame behaviour, this will set the corner radius to the correct values if the frame has set its `HeightRequest` | |
/// Android : Corner radius should be the same as the height | |
/// iOS : Corner radius should be 58.33% of the height | |
/// </summary> | |
internal class RoundedFrameBehaviour : Behavior<Frame> | |
{ | |
protected override void OnAttachedTo(BindableObject bindable) | |
{ | |
base.OnAttachedTo(bindable); |
This file contains 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.Threading.Tasks; | |
using Android; | |
using Android.App; | |
using Android.Content; | |
using Android.Content.PM; | |
using Android.Hardware.Biometrics; | |
using Android.OS; | |
using Android.Support.V4.App; | |
using Android.Support.V4.Hardware.Fingerprint; |
This file contains 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
namespace Visit.Mobile.MarkupExtensions | |
{ | |
/// <summary> | |
/// A string case extension that can be used in XAML with static values (like localized strings). | |
/// Using this is the same as using a string case converter for bindings. | |
/// </summary> | |
[ContentProperty(nameof(Input))] | |
public class StringCaseExtension : IMarkupExtension | |
{ | |
public string Input { get; set; } |
This file contains 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 IsEmptyConverter : IValueConverter | |
{ | |
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | |
{ | |
if(!(value is string stringValue)) return false; | |
return string.IsNullOrEmpty(stringValue); | |
} |
This file contains 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 IsEmptyConverter : IValueConverter, IMarkupExtension | |
{ | |
public bool Inverted { get; set; } | |
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | |
{ | |
if(!(value is string stringValue)) return false; | |
return Inverted ? !string.IsNullOrEmpty(stringValue) : string.IsNullOrEmpty(stringValue); | |
} |
This file contains 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
<Label Text="Is visible if MyText is empty" | |
IsVisible="{Binding MyText, Converter={converters:IsEmptyConverter}}" /> | |
OlderNewer