{"id":15011654,"url":"https://github.com/nkristek/wpf.converters","last_synced_at":"2025-04-12T03:31:08.075Z","repository":{"id":50387358,"uuid":"130915652","full_name":"nkristek/Wpf.Converters","owner":"nkristek","description":"A collection of often used converters to write a WPF based application","archived":false,"fork":false,"pushed_at":"2020-03-03T23:01:43.000Z","size":106,"stargazers_count":62,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T16:06:57.561Z","etag":null,"topics":["converter","csharp","dotnet","dotnet-framework","hacktoberfest","imultivalueconverter","ivalueconverter","nuget","nuget-package","wpf","xaml"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nkristek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-24T21:26:45.000Z","updated_at":"2025-01-11T07:24:10.000Z","dependencies_parsed_at":"2022-09-02T10:11:29.607Z","dependency_job_id":null,"html_url":"https://github.com/nkristek/Wpf.Converters","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkristek%2FWpf.Converters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkristek%2FWpf.Converters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkristek%2FWpf.Converters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkristek%2FWpf.Converters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nkristek","download_url":"https://codeload.github.com/nkristek/Wpf.Converters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248512547,"owners_count":21116623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","csharp","dotnet","dotnet-framework","hacktoberfest","imultivalueconverter","ivalueconverter","nuget","nuget-package","wpf","xaml"],"created_at":"2024-09-24T19:41:24.008Z","updated_at":"2025-04-12T03:31:07.296Z","avatar_url":"https://github.com/nkristek.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wpf.Converters\n\n[![CI Status](https://github.com/nkristek/Wpf.Converters/workflows/CI/badge.svg)](https://github.com/nkristek/Wpf.Converters/actions)\n[![NuGet version](https://img.shields.io/nuget/v/NKristek.Wpf.Converters.svg)](https://www.nuget.org/packages/NKristek.Wpf.Converters/)\n\nThis library contains a collection of often used converters to write a WPF based application.\n\n## Installation\n\nThe recommended way to use this library is via [Nuget](https://www.nuget.org/packages/nkristek.Wpf.Converters/).\n\nCurrently supported frameworks:\n- .NET Framework 3.5 or higher\n- .NET Core 3.0 or higher\n\n## Getting started\n\nImport it via:\n```xaml\nxmlns:c=\"clr-namespace:NKristek.Wpf.Converters;assembly=NKristek.Wpf.Converters\"\n```\n\nYou can use a converter from this library either by using the MarkupExtension*:\n```xaml\n\u003cLabel Content=\"{Binding Value}\"\n       Visibility=\"{Binding Value, Converter={c:ValueNotNullToVisibilityConverter}}\" /\u003e\n```\nor static instance:\n```xaml\n\u003cLabel Content=\"{Binding Value}\"\n       Visibility=\"{Binding Value, Converter={x:Static c:ValueNotNullToVisibilityConverter.Instance}}\" /\u003e\n```\nor of course create instances in the views:\n```xaml\n\u003cWindow.Resources\u003e\n    \u003cc:ValueNotNullToVisibilityConverter x:Key=\"ValueNotNullToVisibilityConverter\" /\u003e\n\u003c/Window.Resources\u003e\n\n\u003cLabel Content=\"{Binding Value}\"\n       Visibility=\"{Binding Value, Converter={StaticResource ValueNotNullToVisibilityConverter}}\" /\u003e\n```\n\nYou 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```.\n\n```xaml\n\u003cc:ValueConverterChain x:Key=\"ValueNullToInverseBoolConverter\"\u003e\n    \u003cc:ValueNullToBoolConverter/\u003e\n    \u003cc:BoolToInverseBoolConverter/\u003e\n\u003c/c:ValueConverterChain\u003e\n```\nThe above use of the ```ValueConverterChain``` would be equivalent to the ```ValueNullToInverseBoolConverter```.\n\n*: Only available if target framework is \u003e= .NET 4.0.\n\n## Overview\n\nBool:\n- BoolToInverseBoolConverter\n- ValueNullToBoolConverter\n- ValueNullToInverseBoolConverter\n- StringNullOrEmptyToBoolConverter\n- StringNullOrEmptyToInverseBoolConverter\n- ICollectionNullOrEmptyToBoolConverter\n- ICollectionNullOrEmptyToInverseBoolConverter\n- AllBoolToBoolConverter\n- AllBoolToInverseBoolConverter\n- AnyBoolToBoolConverter\n- AnyBoolToInverseBoolConverter\n- ObjectToStringEqualsParameterToBoolConverter\n- ObjectToStringEqualsParameterToInverseBoolConverter\n\nVisibility:\n- VisibilityToInverseVisibilityConverter\n- BoolToVisibilityConverter\n- BoolToInverseVisibilityConverter\n- ValueNullToVisibilityConverter\n- ValueNullToInverseVisibilityConverter\n- StringNullOrEmptyToVisibilityConverter\n- StringNullOrEmptyToInverseVisibilityConverter\n- ICollectionNullOrEmptyToVisibilityConverter\n- ICollectionNullOrEmptyToInverseVisibilityConverter\n- AllBoolToVisibilityConverter\n- AllBoolToInverseVisibilityConverter\n- AnyBoolToVisibilityConverter\n- AnyBoolToInverseVisibilityConverter\n- ObjectToStringEqualsParameterToVisibilityConverter\n- ObjectToStringEqualsParameterToInverseVisibilityConverter\n\nOther:\n- DateTimeToStringConverter\n- ValueConverterChain\n\n## Contribution\n\nIf you find a bug feel free to open an issue. Contributions are also appreciated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkristek%2Fwpf.converters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnkristek%2Fwpf.converters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkristek%2Fwpf.converters/lists"}