Chapter.Net.WPF.Controls 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Chapter.Net.WPF.Controls --version 2.0.0                
NuGet\Install-Package Chapter.Net.WPF.Controls -Version 2.0.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.Net.WPF.Controls" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Chapter.Net.WPF.Controls --version 2.0.0                
#r "nuget: Chapter.Net.WPF.Controls, 2.0.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.Net.WPF.Controls as a Cake Addin
#addin nuget:?package=Chapter.Net.WPF.Controls&version=2.0.0

// Install Chapter.Net.WPF.Controls as a Cake Tool
#tool nuget:?package=Chapter.Net.WPF.Controls&version=2.0.0                

<img src="https://raw.githubusercontent.com/dwndland/Chapter.Net.WPF.Controls/master/Icon.png" alt="logo" width="64"/>

Chapter.Net.WPF.Controls Library

Overview

A set of new WPF controls which are not yet build in.

Features

  • ChapterTextBox: Enhances the WPF TextBox by the possibilities to show background text, drop files and folders and place additional controls in.
  • ChapterArcPanel: Arranges child elements in an arc form.
  • ChapterBrowseTextBox: Adds a browse button to the ChapterTextBox.
  • ChapterTabControl: Enhances the TabControl with buttons for add new tab item and close buttons of existing tab items.
  • ChapterEllipsePanel: Arranges child elements in a configurable ellipse form.
  • ChapterComboBox: Represents a ComboBox which takes an enumeration value and shows all possible states inside the dropdown menu for let choosing a value.
  • ChapterTreeView: Enhances ChapterTreeView multi select, select an item by right click on it and a two way bindable SelectedItem.
  • ChapterTextBlock: Formats the given translation.
  • ChapterHeaderedContentControl: Provides the possibility to automatically align Headers and contents.
  • ChapterButton: Enhances the WPF Button to show an disabled image. The bound image will be shown monochrome if the button is disabled.
  • ItemsPanel: A UniformGrid with only one row or one column, depending on the orientation, which adds a spacing between the items.
  • ChapterNumberBox: Displays a TextBox to accept numeric values only, so the text can be bound to a numeric property directly without converting.
  • ChapterToggleSwitch: A custom checkbox where a slider shows the checked and unchecked state.
  • ChapterPasswordBox: Hosts and enhances the WPF ChapterPasswordBox to be able to bind the password value and show info text in the background.
  • ChapterResizer: Brings the possibility to resize every UI control manually by hold and drag the corners or sides.
  • ChapterSearchTextBox: Adds search and cancel buttons to the ChapterTextBox to represent a search box shown like in the Windows explorer.
  • ChapterStackPanel: A StackPanel which adds a spacing between the items.
  • ChapterSplitButton: A button with a drop down where more commands can be available.
  • ChapterTimeBox: Shows textboxes to let the user input a time.
  • ChapterTitledItemsControl: Provides the possibility to automatically align titles and contents.
  • ChapterTreeListView: Shows a TreeView with the possibility to expand or collapse child elements shown in a GridView. The expander can be placed in every column cell template.
  • ChapterUniformPanel: A UniformGrid with only one row or one column, depending on the orientation, which adds a spacing between the items.
  • ChapterWrapPanel: Enhances the WrapPanel by the feature that all items will have the same size.

Getting Started

  1. Installation:

    • Install the Chapter.Net.WPF.Controls library via NuGet Package Manager:
    dotnet add package Chapter.Net.WPF.Controls
    
  2. ChapterTextBox:

    • Usage
    <chapter:ChapterTextBox InfoText="Required"
                            AllowedDropType="Files"
                            Separator=";"
                            WhitespaceHandling="Trim"
                            InputLimiter="{controls:AlphaInputLimiter}"
                            TextModificator="{controls:ToUpperModificator OnLostFocus}" />
    

    ChapterTextBox

  3. ChapterArcPanel:

    • Usage
    <ItemsControl ItemsSource="{Binding Cards}">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <chapter:ChapterArcPanel Width="210" Height="100" />
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
    </ItemsControl>
    
    <chapter:ChapterArcPanel Width="300" Height="100">
        <Button Content="One" />
        <Button Content="Two" />
        <Button Content="Three" />
        <Button Content="Four" />
    </chapter:ChapterArcPanel>
    

    ChapterArcPanel

  4. ChapterBrowseTextBox:

    • Usage
    <chapter:ChapterBrowseTextBox ShowBrowseButton="True"
                                  BrowseCommand="{Binding BrowseCommand}" />
    

    ChapterBrowseTextBox

  5. ChapterTabControl:

    • Usage
    <chapter:ChapterTabControl ShowAddButton="True"
                               TabItemAddingCommand="{Binding AddItemCommand}"
                               TabItemClosingCommand="{Binding RemoveItemCommand}" />
    

    ChapterTabControl

  6. ChapterEllipsePanel:

    • Usage
    <ItemsControl ItemsSource="{Binding Player}">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <chapter:ChapterEllipsePanel ElementStartPosition="Bottom"
                                             EllipseRotateDirection="Clockwise"
                                             ElementsRotateDirection="Outroversive"
                                             RotateElements="True" />
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
    </ItemsControl>
    
    <chapter:ChapterEllipsePanel>
        <Button Content="One" />
        <Button Content="Two" />
        <Button Content="Three" />
        <Button Content="Four" />
    </chapter:ChapterEllipsePanel>
    

    ChapterEllipsePanel

  7. ChapterComboBox:

    • Usage
    public enum Number
    {
        [Description("The Number One")]
        One,
    
        [Description("The Number Two")]
        Two,
    
        [Description("The Number Three")]
        Three
    }
    
    public class MainViewModel : ObservableObject
    {
        public MainViewModel()
        {
            Number = Number.One;
        }
    
        public Number Number
        {
            get { return _number; }
            set
            {
                _number = value;
                NotifyPropertyChanged("Number");
            }
        }
        private Number _number;
    }
    
    
    
    
    <chapter:ChapterComboBox EnumType="{x:Type Demo:Number}" SelectedItem="{Binding Number}">
        <chapter:ChapterComboBox.ItemTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Name: " />
                    <TextBlock Text="{Binding }" />
                    <TextBlock Text="; Description: " />
                    <TextBlock Text="{Binding Converter={StaticResource EnumDescriptionConverter}}" />
                </StackPanel>
            </DataTemplate>
        </chapter:ChapterComboBox.ItemTemplate>
    </chapter:ChapterComboBox>
    
    
    <chapter:ChapterComboBox EnumType="{x:Type Demo:Number}" SelectedItem="{Binding Number}" DisplayKind="Description" />
    
    
    <chapter:ChapterComboBox EnumType="{x:Type Demo:Number}" SelectedItem="{Binding Number}" DisplayKind="ToString" />
    
    
    <chapter:ChapterComboBox EnumType="{x:Type Demo:Number}" SelectedItem="{Binding Number}" DisplayKind="Converter" ItemConverter="{StaticResource EnumToStringConverter}" />
    

    ChapterComboBox

  8. ChapterTreeView:

    • Usage
    <chapter:ChapterTreeView ItemsSource="{Binding Folders}"
                             SelectedElement="{Binding SelectedItem, Mode=TwoWay}"
                             AutoExpandSelected="True">
        <chapter:ChapterTreeView.ItemTemplate>
            <HierarchicalDataTemplate ItemsSource="{Binding Folders}">
                <TextBlock Text="{Binding Name}" />
            </HierarchicalDataTemplate>
        </chapter:ChapterTreeView.ItemTemplate>
    </chapter:ChapterTreeView>
    

    ChapterTreeView

  9. ChapterTextBlock:

    • Usage
    <ListBox ItemsSource="{Binding Patients}">
        <ListBox.ItemTemplate>
            <DataTemplate>
                <chapter:ChapterTextBlock Formatter="{DynamicResource NameFormatter}">
                    <chapter:FormatterPair Replace="{}{firstName}" With="{Binding FirstName}" />
                    <chapter:FormatterPair Replace="{}{lastName}" With="{Binding LastName}" />
                </chapter:ChapterTextBlock>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
    

    ChapterTextBlock

  10. ChapterHeaderedContentControl:

    • Usage
    <chapter:ChapterHeaderedContentControl>
        <chapter:HeaderItem Header="Name">
            <TextBox Text="{Binding Name}" />
        </chapter:HeaderItem>
        <chapter:HeaderItem Header="Family Name">
            <TextBox Text="{Binding FamilyName}" />
        </chapter:HeaderItem>
        <chapter:HeaderItem Header="Age">
            <TextBox Text="{Binding Age}" />
        </chapter:HeaderItem>
    </chapter:HeaderdItemsControl>
    

    ChapterHeaderedContentControl

  11. ChapterButton:

    • Usage
    <UniformGrid Rows="1" DockPanel.Dock="Bottom" HorizontalAlignment="Center">
    
        <chapter:ChapterButton Content="Back"
                               ImageSource="/MyAssembly;component/Data/Previous.png" />
    
        <chapter:ChapterButton Content="Next"
                               ImageSource="/MyAssembly.Demo;component/Data/Next.png" 
                               ImagePosition="Right"
                               ImageMargin="4,0,0,0" />
    
        <chapter:ChapterButton Content="Finish"
                               IsEnabled="False"
                               ImageSource="/MyAssembly;component/Data/OK.png" />
    
        <chapter:ChapterButton Content="Cancel"
                               ImageSource="/MyAssembly;component/Data/Cancel.png" />
    
    </UniformGrid>
    

    ChapterButton

  12. ItemsPanel:

    • Usage
    <Window>
        <DockPanel>
            <controls:ItemsPanel DockPanel.Dock="Bottom"
                                 IsUniform="True"
                                 HorizontalAlignment="Right"
                                 Orientation="Horizontal"
                                 Spacing="10">
                <Button Content="Back" />
                <Button Content="Next" />
                <Button Content="Finish" />
                <Button Content="Cancel" />
            </controls:ItemsPanel>
    
            <Grid />
        </DockPanel>
    </Window>
    
    <Window>
        <DockPanel>
            <controls:ItemsPanel DockPanel.Dock="Bottom"
                                 IsUniform="False"
                                 HorizontalAlignment="Right"
                                 Orientation="Horizontal"
                                 Spacing="10">
                <Button Content="Back" />
                <Button Content="Next" />
                <Button Content="Finish" />
                <Button Content="Cancel" />
            </controls:ItemsPanel>
    
            <controls:ItemsPanel Spacings="10">
                <TextBox />
                <TextBox />
            </controls:ItemsPanel>
        </DockPanel>
    </Window>
    

    ItemsPanel

  13. ChapterNumberBox:

    • Usage
    
    <chapter:ChapterNumberBox NumberType="Double"
    
                              Number="{Binding MyDoubleValue}"
                              Minimum="-12.5"
                              Maximum="55.5"
                              DefaultNumber="5"
    
                              ShowCurrency="True"
                              Currency="�"
                              CurrencyPosition="Right"
    
                              HasCheckBox="True"
                              CheckBoxBehavior="EnableIfChecked"
                              IsChecked="{Binding MyDoubleValueIsChecked}"
                              CheckBoxPosition="Left"
    
                              UpDownBehavior="ArrowsAndButtons"
                              Step="0.5"
                              UpDownButtonsPosition="Right"
    
                              NumberSelectionBehavior="OnFocusAndUpDown"
    
                              LostFocusBehavior="{Toolkit:LostFocusBehavior PlaceDefaultNumber, TrimLeadingZero=True, FormatText={}{0:D2}}"
    
                              PredefinesCulture="en-US" />
    

    ChapterNumberBox

  14. ChapterToggleSwitch:

    • Usage
    <chapter:ChapterToggleSwitch SliderShape="Round" BackShape="Round" IsChecked="{Binding IsOn}" />
    
    <chapter:ChapterToggleSwitch SliderShape="Square" BackShape="Square" SliderWidth="18" IsChecked="{Binding IsOn}" />
    
    <chapter:ChapterToggleSwitch SliderShape="Square" BackShape="Square" SliderWidth="18" BackMargin="10,6" HasText="False" IsChecked="{Binding IsOn}" />
    

    ChapterToggleSwitch

  15. ChapterPasswordBox:

    • Usage
    <chapter:ChapterPasswordBox Password="{Binding Password}" InfoText="Required" InfoAppearance="OnEmpty" />
    

    ChapterPasswordBox

  16. ChapterResizer:

    • Usage
    <StackPanel Orientation="Horizontal" VerticalAlignment="Top">
        <chapter:ChapterResizer FrameSizes="0,0,4,4" Margin="0,0,20,0" VerticalAlignment="Top" CornerSize="12">
            <Button Content="Button" Padding="12" />
        </chapter:ChapterResizer>
        <chapter:ChapterResizer RightWidth="4" Margin="0,0,20,0" VerticalAlignment="Top">
            <Button Content="Button" Padding="12" />
        </chapter:ChapterResizer>
        <chapter:ChapterResizer BottomHeight="4" VerticalAlignment="Top">
            <Button Content="Button" Padding="12" />
        </chapter:ChapterResizer>
    </StackPanel>
    

    ChapterResizer

  17. ChapterSearchTextBox:

    • Usage
    <chapter:ChapterSearchTextBox ShowSearchButton="True"
                                  SearchCommand="{Binding SearchCommand}"
                                  IsSearching="{Binding IsSearching}"
                                  CancelCommand="{Binding CancelSearchCommand}" />
    

    ChapterSearchTextBox

  18. ChapterStackPanel:

    • Usage
    <chapter:ChapterStackPanel DockPanel.Dock="Bottom"
                               HorizontalAlignment="Right"
                               Orientation="Horizontal"
                               Spacing="10">
        <Button Content="Back" />
        <Button Content="Next" />
        <Button Content="Finish" />
        <Button Content="Cancel" />
    </chapter:ChapterStackPanel>
    
    <chapter:ChapterStackPanel Spacings="10">
        <TextBox />
        <TextBox />
    </chapter:ChapterStackPanel>
    

    ChapterStackPanel

  19. ChapterSplitButton:

    • Usage
    <chapter:ChapterSplitButton Content="Any Button" Padding="12,4" Command="{Binding ChapterSplitButtonCommand}">
        <chapter:ChapterSplitButtonItem Content="Sub Item 1" Command="{Binding ChapterSplitButtonItemCommand}" CommmandParameter="1" />
        <chapter:ChapterSplitButtonItem Content="Sub Item 2" Command="{Binding ChapterSplitButtonItemCommand}" CommmandParameter="2" />
        <chapter:ChapterSplitButtonItem Content="Sub Item 3" Command="{Binding ChapterSplitButtonItemCommand}" CommmandParameter="3" />
    </chapter:ChapterSplitButton>
    
    <chapter:ChapterSplitButton Content="Any Button" Padding="12,4" ItemsSource="{Binding Items}" Command="{Binding ChapterSplitButtonCommand}">
        <chapter:ChapterSplitButton.ItemContainerStyle>
            <Style TargetType="{x:Type chapter:ChapterSplitButtonItem}">
                <Setter Property="Command" Value="{Binding DataContext.ChapterSplitButtonItemCommand, RelativeSource={RelativeSource AncestorType={x:Type buttons:ChapterSplitButton}}}" />
                 <Setter Property="CommandParameter" Value="{Binding Index}" />
                 <Setter Property="HorizontalContentAlignment" Value="Left" />
             </Style>
         </chapter:ChapterSplitButton.ItemContainerStyle>
         <chapter:ChapterSplitButton.ItemTemplate>
             <DataTemplate>
                 <TextBlock Text="{Binding }" />
             </DataTemplate>
         </chapter:ChapterSplitButton.ItemTemplate>
     </chapter:ChapterSplitButton>
    

    ChapterSplitButton

  20. ChapterTimeBox:

    • Usage
    <chapter:ChapterTimeBox HasUpDownButtons="True" TimeFormat="Long" Time="{Binding CurrentTime}" />
    

    ChapterTimeBox

  21. ChapterTitledItemsControl:

    • Usage
    <chapter:ChapterTitledItemsControl>
        <chapter:ChapterTitledItem Text="Name">
            <TextBox Text="{Binding Name}" />
        </chapter:ChapterTitledItem>
        <chapter:ChapterTitledItem Text="Family Name">
            <TextBox Text="{Binding FamilyName}" />
        </chapter:ChapterTitledItem>
        <chapter:ChapterTitledItem Text="Age">
            <TextBox Text="{Binding Age}" />
        </chapter:ChapterTitledItem>
    </chapter:ChapterTitledItemsControl>
    

    ChapterTitledItemsControl

  22. ChapterTreeListView:

    • Usage
    <chapter:ChapterTreeListView ItemsSource="{Binding Customer}">
        <chapter:ChapterTreeListView.Resources>
            <HierarchicalDataTemplate DataType="{x:Type Data:Customer}" ItemsSource="{Binding Customer}" />
        </chapter:ChapterTreeListView.Resources>
        <chapter:ChapterTreeListView.View>
            <GridView>
                <GridViewColumn Header="Name">
                    <GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <DockPanel>
                                <chapter:ListViewExpander DockPanel.Dock="Left" />
                                <TextBlock Text="{Binding Name}" Margin="5,0,0,0" />
                            </DockPanel>
                        </DataTemplate>
                    </GridViewColumn.CellTemplate>
                </GridViewColumn>
                <GridViewColumn Header="Family Name" DisplayMemberBinding="{Binding FamilyName}" />
            </GridView>
        </chapter:ChapterTreeListView.View>
    </chapter:ChapterTreeListView>
    

    ChapterTreeListView

  23. ChapterUniformPanel:

    • Usage
    <chapter:ChapterUniformPanel DockPanel.Dock="Bottom"
                                 HorizontalAlignment="Right"
                                 Orientation="Horizontal"
                                 Spacing="10">
        <Button Content="Back" />
        <Button Content="Next" />
        <Button Content="Finish" />
        <Button Content="Cancel" />
    </chapter:ChapterUniformPanel>
    

    ChapterUniformPanel

  24. ChapterWrapPanel:

    • Usage
    <ItemsControl ItemsSource="{Binding Images}">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <chapter:ChapterWrapPanel />
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
    </ItemsControl>
    
    <chapter:ChapterWrapPanel Orientation="Horizontal" MinItemWidth="100">
        <Button Content="One" />
        <Button Content="Two" />
        <Button Content="Three" />
    </chapter:ChapterWrapPanel>
    

    ChapterWrapPanel

(Note: The shown images are taken from the demo project and are not made by the code next to it.)

License

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 net5.0 was computed.  net5.0-windows was computed.  net5.0-windows7.0 is compatible.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net6.0-windows7.0 is compatible.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible. 
.NET Core netcoreapp3.0 is compatible.  netcoreapp3.1 was computed. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
3.0.0 79 6/7/2024
2.0.0 130 5/20/2024
1.2.0 161 3/31/2024
1.1.0 149 3/28/2024
1.0.2 343 2/2/2024
1.0.1 313 1/30/2024
1.0.0 482 12/24/2023