Dreamine.UI.Wpf 1.0.1
Dreamine.UI.Wpf 사용자 인터페이스 기능과 구성 요소를 제공합니다.
로딩중...
검색중...
일치하는것 없음
MultiBoolOrToVisibilityConverter.cs
이 파일의 문서화 페이지로 가기
1using System;
2using System.Collections.Generic;
3using System.Globalization;
4using System.Linq;
5using System.Text;
6using System.Threading.Tasks;
7using System.Windows.Data;
8using System.Windows;
9
11{
20 public class MultiBoolOrToVisibilityConverter : IMultiValueConverter
21 {
78 public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
79 {
80 foreach (var val in values)
81 {
82 if (val is bool b && b)
83 return Visibility.Visible;
84 }
85 return Visibility.Collapsed;
86 }
87
144 public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
145 => throw new NotImplementedException();
146 }
147}
object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)