object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     return(BooleanBoxes.GetBox(object.Equals(value, parameter)));
 }
 object IMultiValueConverter.Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
 {
     return(values == null || values.Length < 2 ? DependencyProperty.UnsetValue : BooleanBoxes.GetBox(Object.Equals(values[0], values[1])));
 }
 public static void SetUpdateOnEnter(TextBox textBox, bool value) => textBox?.SetValue(TextBoxUpdateSource.UpdateOnEnterProperty, BooleanBoxes.GetBox(value));
Example #4
0
 public static void SetSelectItemOnClick(ListBoxItem item, bool value)
 {
     item?.SetValue(ItemSelection.SelectItemOnClickProperty, BooleanBoxes.GetBox(value));
 }
Example #5
0
 public static void SetIsHidden(GridViewColumn column, bool value)
 {
     column?.SetValue(ColumnVisibility.IsHiddenProperty, BooleanBoxes.GetBox(value));
 }
 object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     return(value is int integer?BooleanBoxes.GetBox(integer % 2 == 0) : DependencyProperty.UnsetValue);
 }
 object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     return(BooleanBoxes.GetBox(string.IsNullOrEmpty(value as string)));
 }
Example #8
0
 public static void SetPersist(TabControl tabControl, bool value)
 {
     tabControl?.SetValue(TabContent.PersistProperty, BooleanBoxes.GetBox(value));
 }
Example #9
0
 public static void SetSelectOnFocus(TextBoxBase textBox, bool value) => textBox?.SetValue(TextBoxSelect.SelectOnFocusProperty, BooleanBoxes.GetBox(value));