2025-08-15 16:34:31 +08:00

26 lines
784 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace SWS.CAD.Converter
{
public class ExpandConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
// 假设我们基于某个布尔属性来决定是否展开
return (bool)value; // 直接返回布尔值用于IsExpanded绑定
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return (bool)value;
//throw new NotImplementedException(); // 不需要实现反向转换
}
}
}