|
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Data;
-
- namespace BPASmartClient.CustomResource.Converters
- {
- public class OpacityConverter: IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- double returnValue = 0.2;
- if (value != null && value is bool statusValue)
- {
- switch (statusValue)
- {
- case true:
- returnValue = 1;
- break;
- case false:
- returnValue = 0.2;
- break;
-
- }
- }
- return returnValue;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- }
|