2
0
Files
maui-linux-samples/TodoApp/CompletedToTextDecorationsConverter.cs

31 lines
649 B
C#
Raw Normal View History

using System;
using System.Globalization;
using Microsoft.Maui;
using Microsoft.Maui.Controls;
namespace TodoApp;
public class CompletedToTextDecorationsConverter : IValueConverter
{
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
bool flag = default(bool);
int num;
if (value is bool)
{
flag = (bool)value;
num = 1;
}
else
{
num = 0;
}
return (object)(TextDecorations)((((uint)num & (flag ? 1u : 0u)) != 0) ? 2 : 0);
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}