| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 | 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<Menu> items = value as ObservableCollection<Menu>;                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;        }    }}
 |