Chapter.WPF.Converters 1.8.0

Suggested Alternatives


The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Chapter.WPF.Converters --version 1.8.0                
NuGet\Install-Package Chapter.WPF.Converters -Version 1.8.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Chapter.WPF.Converters" Version="1.8.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Chapter.WPF.Converters --version 1.8.0                
#r "nuget: Chapter.WPF.Converters, 1.8.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Chapter.WPF.Converters as a Cake Addin
#addin nuget:?package=Chapter.WPF.Converters&version=1.8.0

// Install Chapter.WPF.Converters as a Cake Tool
#tool nuget:?package=Chapter.WPF.Converters&version=1.8.0                

Chapter.WPF.Converters Library

The Chapter.WPF.Converters provides a big bunch of useful converters to be used in XAMLs for many necessities.


  • BooleanToIntegerConverter: Converts an boolean to its integer representation and back.
  • BooleanToVisibilityInvertedConverter: Converts true to Visibility.Visible and false to Visibility.Collapsed.
  • CountToBooleanConverter: Converts a count to its boolean representation.
  • CountToVisibilityConverter: Converts a count to its visibility representation.
  • DateOnlyToStringConverter: Converts the given date only to a string.
  • DateTimeToStringConverter: Converts the given date time to a string.
  • DateTimeUtcConverter: Converts the given date time to universal or local time.
  • DoubleValueToThicknessConverter: Converts a value to a thickness by telling for what that value it.
  • EqualsToBooleanConverter: Equals two values and returns its result.
  • EqualsToVisibilityConverter: Equals two values and returns its visibility representation.
  • IntegerToBooleanConverter: Converts an integer to its boolean representation and back.
  • InverseBooleanConverter: Converts a boolean to is opposite.
  • IsLastItemInListConverter: Checks if the given item container is the last in the list.
  • MultiEqualsToBooleanConverter: Equals multiple values and returns its result.
  • MultiEqualsToVisibilityConverter: Equals multiple values and returns its visibility representation.
  • MultiValueToPathConverter: Combines all given strings into a path.
  • MultiValueToThicknessConverter: Creates a new thickness object by the given values.
  • NullToBooleanConverter: Converts the null or not null value to bool with an optional direction parameter.
  • NullToVisibilityConverter: Converts the null or not null value to Visibility.
  • PathToStringConverter: Converts a full path to a section from it.
  • TimeOnlyToStringConverter: Converts the given time only to a string.

Getting Started

  1. Installation:

    • Install the Chapter.WPF.Converters library via NuGet Package Manager:
    dotnet add package Chapter.WPF.Converters
  2. Usage:

    • Configure the converter on usage if available and needed.
            <converters:BooleanToIntegerConverter x:Key="BooleanToIntegerConverter" />
            <converters:PathToStringConverter x:Key="PathToStringConverter" Section="Directory" />


  • Simple Usage

            <converters:BooleanToIntegerConverter x:Key="BooleanToIntegerConverter" />
        <TextBlock Text="{Binding IsChecked, Converter={StaticResource BooleanToIntegerConverter}}" />
  • Complex Usage 1

            <converters:MultiEqualsToBooleanConverter x:Key="MultiEqualsToBooleanConverter" />
        <controls:TitledItem Title="MultiEqualsToBooleanConverter">
            <StackPanel Orientation="Horizontal">
                    <CheckBox x:Name="checked4" Content="Checked" />
                    <CheckBox x:Name="checked5" Content="Checked" />
                    <CheckBox x:Name="checked6" Content="Checked" />
                <TextBlock Margin="10,0"
                            Text="-&gt;" />
                <CheckBox VerticalAlignment="Center"
                            Content="Are Equal"
                        <MultiBinding Converter="{StaticResource MultiEqualsToBooleanConverter}">
                            <Binding ElementName="checked4" Path="IsChecked" />
                            <Binding ElementName="checked5" Path="IsChecked" />
                            <Binding ElementName="checked6" Path="IsChecked" />
  • Complex Usage 2

    <controls:TitledItem Title="IsLastItemInListConverter">
        <DataGrid HorizontalAlignment="Left"
                    ItemsSource="{Binding Integers}">
                <Style TargetType="{x:Type DataGridRow}">
                    <Setter Property="Background" Value="White" />
                    <Setter Property="Template">
                            <ControlTemplate TargetType="{x:Type DataGridRow}">
                                <Border Background="{TemplateBinding Background}">
                                    <DataGridCellsPresenter />
                                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Converter={StaticResource IsLastItemInListConverter}}" Value="True">
                                        <Setter Property="Background" Value="Yellow" />
                <DataGridTextColumn Width="100"
                                    Binding="{Binding Value}"
                                    SortMemberPath="Value" />


Copyright (c) David Wendland. All rights reserved.
Licensed under the MIT License. See LICENSE file in the project root for full license information.

Product Compatible and additional computed target framework versions.
.NET net7.0-windows7.0 is compatible.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated