using System; using System.Collections.ObjectModel; using System.Windows; using System.Windows.Data; using System.Windows.Media; namespace CyberX8_Themes.Converters { public class MenusToVisibility : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if(value != null) return Visibility.Collapsed; return Visibility.Visible; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return null; } } public class MenusToCount : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value != null) { //ObservableCollection items = value as ObservableCollection; return ""; } return ""; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return null; } } public class MenusToColor : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value != null) { return new SolidColorBrush(Colors.Blue); } return new SolidColorBrush(Colors.Black); } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return null; } } }