This commit is contained in:
Meik
2026-03-05 09:56:57 +01:00
parent 838e6b1ee1
commit 4013fa8e32
827 changed files with 743038 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
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;
using System.Windows.Markup;
using System.Windows.Media.Effects;
namespace C4IT_CustomerPanel.Converter
{
public class BooleanToBlurEffectConverter : MarkupExtension, IValueConverter
{
public double Radius { get; set; } = 5;
public object Convert(
object value, Type targetType, object parameter,
CultureInfo culture)
{
if (!(value is bool))
return null;
return (bool)value ? new BlurEffect() { Radius = Radius, KernelType = KernelType.Gaussian } :
null;
}
public object ConvertBack(
object value, Type targetType, object parameter,
CultureInfo culture)
{
throw new NotImplementedException();
}
public override object ProvideValue(IServiceProvider serviceProvider)
{
return this;
}
}
}