NoesisGUI
 

🔹 BoolInvertConverter Class

namespace NoesisApp

Inverts a boolean binding.

Converts true to false and false to true.

<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions">

  <Grid.Resources>
    <noesis:BoolInvertConverter x:Key="BoolInvert" />
  </Grid.Resources>

  <StackPanel>
    <CheckBox x:Name="MyCheckBox" Content="Disable Button" />
    <Button Content="Submit"
      IsEnabled="{Binding IsChecked, ElementName=MyCheckBox,
         Converter={StaticResource BoolInvert}}" />
  </StackPanel>

</Grid>

Inheritance Hierarchy

BoolInvertConverter

📚 Class Hierarchy Index

Properties

BoolInvertConverter has no properties

Attached Properties

BoolInvertConverter has no attached properties

Methods

From BaseValueConverter

Name Description
 TryConvert(BaseComponent*, const Type*, BaseComponent*, Ptr<BaseComponent>&)

The data binding engine calls this method when it propagates a value from the binding source to the binding target.

Return DependencyProperty.UnsetValue to indicate that the converter produced no value and that the fallback (if available) or default value should be used instead.

Return Binding.DoNothing to indicate that the binding should not transfer the value or use the fallback or default value.

 TryConvertBack(BaseComponent*, const Type*, BaseComponent*, Ptr<BaseComponent>&)

The data binding engine calls this method when it propagates a value from the binding target to the binding source.

Return Binding.DoNothing to indicate that no value should be set on the source property.

Return DependencyProperty.UnsetValue to indicate that the converter is unable to provide a value for the source property, and no value will be set to it.

Events

BoolInvertConverter has no events

 
© 2017 Noesis Technologies