mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-07-10 21:26:25 +02:00
Version 3.0.381
This commit is contained in:
parent
f963c0a219
commit
3a363acf3a
1525 changed files with 60589 additions and 125098 deletions
|
@ -0,0 +1,22 @@
|
|||
using System.Globalization;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace ShareeBike.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 "";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue