Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nkristek/wpf.converters
A collection of often used converters to write a WPF based application
https://github.com/nkristek/wpf.converters
converter csharp dotnet dotnet-framework hacktoberfest imultivalueconverter ivalueconverter nuget nuget-package wpf xaml
Last synced: 23 days ago
JSON representation
A collection of often used converters to write a WPF based application
- Host: GitHub
- URL: https://github.com/nkristek/wpf.converters
- Owner: nkristek
- License: mit
- Created: 2018-04-24T21:26:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-03T23:01:43.000Z (over 4 years ago)
- Last Synced: 2024-10-14T03:03:26.867Z (23 days ago)
- Topics: converter, csharp, dotnet, dotnet-framework, hacktoberfest, imultivalueconverter, ivalueconverter, nuget, nuget-package, wpf, xaml
- Language: C#
- Homepage:
- Size: 104 KB
- Stars: 59
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wpf.Converters
[![CI Status](https://github.com/nkristek/Wpf.Converters/workflows/CI/badge.svg)](https://github.com/nkristek/Wpf.Converters/actions)
[![NuGet version](https://img.shields.io/nuget/v/NKristek.Wpf.Converters.svg)](https://www.nuget.org/packages/NKristek.Wpf.Converters/)This library contains a collection of often used converters to write a WPF based application.
## Installation
The recommended way to use this library is via [Nuget](https://www.nuget.org/packages/nkristek.Wpf.Converters/).
Currently supported frameworks:
- .NET Framework 3.5 or higher
- .NET Core 3.0 or higher## Getting started
Import it via:
```xaml
xmlns:c="clr-namespace:NKristek.Wpf.Converters;assembly=NKristek.Wpf.Converters"
```You can use a converter from this library either by using the MarkupExtension*:
```xaml```
or static instance:
```xaml```
or of course create instances in the views:
```xaml
```
You can also use the ```ValueConverterChain``` converter*, which executes the given converters in succession. Please note, that the TargetType is only correctly set, when the ```ValueConversionAttribute``` is set on the ```IValueConverter```.
```xaml
```
The above use of the ```ValueConverterChain``` would be equivalent to the ```ValueNullToInverseBoolConverter```.*: Only available if target framework is >= .NET 4.0.
## Overview
Bool:
- BoolToInverseBoolConverter
- ValueNullToBoolConverter
- ValueNullToInverseBoolConverter
- StringNullOrEmptyToBoolConverter
- StringNullOrEmptyToInverseBoolConverter
- ICollectionNullOrEmptyToBoolConverter
- ICollectionNullOrEmptyToInverseBoolConverter
- AllBoolToBoolConverter
- AllBoolToInverseBoolConverter
- AnyBoolToBoolConverter
- AnyBoolToInverseBoolConverter
- ObjectToStringEqualsParameterToBoolConverter
- ObjectToStringEqualsParameterToInverseBoolConverterVisibility:
- VisibilityToInverseVisibilityConverter
- BoolToVisibilityConverter
- BoolToInverseVisibilityConverter
- ValueNullToVisibilityConverter
- ValueNullToInverseVisibilityConverter
- StringNullOrEmptyToVisibilityConverter
- StringNullOrEmptyToInverseVisibilityConverter
- ICollectionNullOrEmptyToVisibilityConverter
- ICollectionNullOrEmptyToInverseVisibilityConverter
- AllBoolToVisibilityConverter
- AllBoolToInverseVisibilityConverter
- AnyBoolToVisibilityConverter
- AnyBoolToInverseVisibilityConverter
- ObjectToStringEqualsParameterToVisibilityConverter
- ObjectToStringEqualsParameterToInverseVisibilityConverterOther:
- DateTimeToStringConverter
- ValueConverterChain## Contribution
If you find a bug feel free to open an issue. Contributions are also appreciated.