Version 3.0.255

This commit is contained in:
Oliver Hauff 2021-11-07 19:42:59 +01:00
parent db9c288584
commit 5a26bf273b
1495 changed files with 159465 additions and 5060 deletions

View file

@ -0,0 +1,23 @@
using System;
using System.Globalization;
using Xamarin.Forms;
namespace TINK.View
{
/// <summary> Converts a string into visible state. If string is null or empty element becomes invisible.</summary>
public class StringNotNullOrEmptyToVisibleConverter : IValueConverter
{
/// <summary> Converts a string into visible state.</summary>
/// <param name="value">Text value from view model used to derive whether object is visible or not.</param>
/// <returns>Boolean value indicating whether object is visible or not.</returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value != null && value is string text && !string.IsNullOrEmpty(text);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return "";
}
}
}