Reapply "add:手动更新"

This reverts commit 703a8a4e0d.
This commit is contained in:
2025-10-06 22:41:42 +08:00
parent 298164d6ed
commit ab1c460225
3 changed files with 174 additions and 0 deletions
+23
View File
@@ -112,4 +112,27 @@ namespace Ink_Canvas.Converter
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); }
}
public class InverseBooleanToVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if ((bool)value)
{
return Visibility.Collapsed;
}
return Visibility.Visible;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if ((bool)value)
{
return Visibility.Collapsed;
}
return Visibility.Visible;
}
}
}