Ejemplo n.º 1
0
 public override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value == null)
         return VectorEditingMode.Length;
     
     return ConverterHelper.ConvertToBoolean(value, culture) ? VectorEditingMode.AllComponents : VectorEditingMode.Normal;
 }
Ejemplo n.º 2
0
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var result = ConverterHelper.ConvertToBoolean(value, culture);

            if (parameter as bool? == false)
            {
                result = !result;
            }
            return(result ? VisibilityBoxes.VisibleBox : VisibilityBoxes.CollapsedBox);
        }
Ejemplo n.º 3
0
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var result = ConverterHelper.ConvertToBoolean(value, culture);

            if (parameter as bool? == false)
            {
                result = !result;
            }
            return(result ? SelectionMode.Extended : SelectionMode.Single);
        }
Ejemplo n.º 4
0
 /// <inheritdoc/>
 public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     var result = !ConverterHelper.ConvertToBoolean(value, culture);
     return result.Box();
 }
Ejemplo n.º 5
0
        /// <inheritdoc/>
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var result = ConverterHelper.ConvertToBoolean(value, culture);

            return(result ? parameter : DependencyProperty.UnsetValue);
        }