NoesisGUI
 

🔹 CaseConverter Class

namespace NoesisApp

Converts a string binding to either upper case or lower case.

The conversion format is controlled by the Format property, allowing this converter to be reused across different bindings that require different text casing.

  • Format: Gets or sets the target casing. Accepts UpperCase or LowerCase.
<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions">

  <Grid.Resources>
    <noesis:CaseConverter x:Key="UpperConverter" Format="UpperCase" />
    <noesis:CaseConverter x:Key="LowerConverter" Format="LowerCase" />
  </Grid.Resources>

  <StackPanel>
    <TextBlock Text="{Binding Headline, Converter={StaticResource UpperConverter}}" />
    <TextBlock Text="{Binding Subtitle, Converter={StaticResource LowerConverter}}" />
  </StackPanel>

</Grid>

Inheritance Hierarchy

CaseConverter

📚 Class Hierarchy Index

Properties

CaseConverter has no properties

Attached Properties

CaseConverter 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

CaseConverter has no events

 
© 2017 Noesis Technologies