| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 | using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Data;using System.Windows.Media;namespace PunkHPX8_MainPages.Converters{    internal class BoolToHeightConverter : IValueConverter    {        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)        {            var item = (bool)value;            if (item == true)            {                return System.Windows.GridLength.Auto;            }            else            {                return new System.Windows.GridLength(0);            }        }        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)        {            return null;        }    }    internal class BoolToHeightConverter2 : IValueConverter    {        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)        {            var item = (bool)value;            if (item == true)            {                return new System.Windows.GridLength();            }            else            {                return new System.Windows.GridLength(0);            }        }        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)        {            return null;        }    }}
 |