Skip to content

Automatically exported from code.google.com/p/wpf-lambda-converters

Notifications You must be signed in to change notification settings

ZlobnyiSerg/wpf-lambda-converters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

WPF Lambda Converters

Set of dynamic lambda-expression converters (for use with Binding). They're based on expression parser came with examples of VS 2008. All expressions are compiled and cached.

Examples

<LambdaConv:LambdaConverter x:Key="NullToVisibility">
    value==null?Visibility.Hidden:Visibility.Visible
</LambdaConv:LambdaConverter>
<LambdaConv:LambdaConverter x:Key="VisibleWhenPositive">
    value&gt;0?Visibility.Visible:Visibility.Hidden
</LambdaConv:LambdaConverter>

Multi-value converting is also supported:

<LambdaConv:MultiLambdaConverter x:Key="ProgressToMarginConverter">
    Helper.CreateThickness(0, 0, Convert.ToDouble(values[0]) * Convert.ToDouble(values[1]) / 100 - 1, 0)    
</LambdaConv:MultiLambdaConverter>

About

Automatically exported from code.google.com/p/wpf-lambda-converters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages