mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-19 16:06:35 +08:00
25 lines
668 B
C#
25 lines
668 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using Avalonia.Collections;
|
|
using Avalonia.Data.Converters;
|
|
|
|
namespace Semi.Avalonia.Converters;
|
|
|
|
public class ItemToObjectConverter: IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value is AvaloniaList<object> list)
|
|
{
|
|
return list.Select(a => new object());
|
|
}
|
|
return new List<object>();
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
} |