Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Checked : IMultiValueConverter
- {
- public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- var width = (double)values[0];
- bool ischecked = (bool)values[1];
- var height = (double)values[2];
- if (ischecked)
- {
- return 0;
- }
- else
- {
- return width - height;
- }
- }
- public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- public class LessHeight : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- return 0.85 * (double)value;
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- public class HalfRadius : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- return new CornerRadius((double)value / 2);
- //return new CornerRadius(5000);
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement