mirror of
https://github.com/wagesj45/butterflow-ui.git
synced 2025-09-09 03:00:39 -05:00
Adding Multible File Support
Added the neccesary functions to support batch processing.
This commit is contained in:
parent
cd23ef899d
commit
b9a9c3e503
10 changed files with 216 additions and 39 deletions
35
butterflow-ui/InverseBoolVisibilityConverter.cs
Normal file
35
butterflow-ui/InverseBoolVisibilityConverter.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace butterflow_ui
|
||||
{
|
||||
[ValueConversion(typeof(bool), typeof(Visibility))]
|
||||
public class InverseBoolVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (targetType == typeof(Visibility))
|
||||
{
|
||||
return (bool)value ? Visibility.Hidden : Visibility.Visible;
|
||||
}
|
||||
|
||||
throw new InvalidCastException(string.Format("Cannot convert type to {0} from bool.", targetType.Name));
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (targetType == typeof(Visibility))
|
||||
{
|
||||
return ((Visibility)value == Visibility.Visible) ? false : true;
|
||||
}
|
||||
|
||||
throw new InvalidCastException(string.Format("Cannot convert type {0} to boolean.", targetType.Name));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue