WPF.AA.CustomControls 1.0.20

dotnet add package WPF.AA.CustomControls --version 1.0.20
NuGet\Install-Package WPF.AA.CustomControls -Version 1.0.20
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="WPF.AA.CustomControls" Version="1.0.20" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WPF.AA.CustomControls --version 1.0.20
#r "nuget: WPF.AA.CustomControls, 1.0.20"
#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 WPF.AA.CustomControls as a Cake Addin
#addin nuget:?package=WPF.AA.CustomControls&version=1.0.20

// Install WPF.AA.CustomControls as a Cake Tool
#tool nuget:?package=WPF.AA.CustomControls&version=1.0.20

WPF.AA.CustomControls

A custom control library for WPF with custom look-less control templates.

Controls

  • ColorPicker
  • ColorSlider
  • GridSplitterPopupExpander
  • NumericUpDown
  • PopupExpander
  • RoundableButton
  • RoundableToggleButton
  • ShowHidePasswordBox
  • WatermarkTextBox
  • ZoomableListBox

Please check out the wiki for more information on each control.

ColorPicker

A color picker control that can be utilized in WPF applications. Uses HSV color space math rather than sampling bitmaps for color accuracy. There is a reason for this...please see wiki for more information.

image

GridSplitterPopupExpander Example

Behaves like the AvalonDock side auto popup window, except that it cannot be ripped out or pinned.

Check out my MainWindow in my VTOL VR Mission Assitant for an example.

image

<GridSplitterPopupExpander ExpandDirection="Up" PopupContentMinimumHeight="100"
                           PopupBoundsElement="{Binding ElementName=innerMainGrid}"
                           Background="#FF2F2F2F" Foreground="#FFFFFFFF" 
                           GridSplitterBackground="#FF007BFF"
                           Header="{Binding Translations.Warnings, FallbackValue=Warnings}">

Fairly simple to implement. PopupBoundsElement should be some kind of root Grid or Border. This is used for positioning and sizing data. This property is required!

Translation Curiosity

Curious about what I am doing for translations and how I can bind to translated strings? Check out my WPF transations API, WPF.Translations.

NumericUpDown

The NumericUpDown control is really easy to use but a couple of things to cover. First, the ValueType property...

The ValueType property specifies the type of data for the Value property. You can set Integer, Decimal or Double. This value is used behind the scenes to convert the values to the appropriate numeric type so comparisons and assignments can occur properly.

Secondly, the ValueFormat property...

The ValueFormat property is the StringFormat used in the binding to the Value property.

<cc:NumericUpDown ValueType="Double" ValueFormat="N2" />
<cc:NumericUpDown /> 

As you can see it is very easy to use. However you can setup a UX that is confusing by not properly utilizing the two aforementioned properties. Meaning, you can set the ValueType to Integer then set the ValueFormat to N2 (or whatever) and get 2 decimal places on your display. As a developer you can set that up but don't. If you are using the N# format then use Decimal or Double. It is also recommended to use Decimal over Double is most situations. The control will not try to add a decimal if one should be there for display, such as in the case of double or decimal data types. The problem is the developers to manage by specifying a ValueFormat.

NumericUpDownDecimal and NumericUpDownDouble

In WPF.AA.CustomControls.DataTemplateControls you will find two variants for the NumericUpDown control. The reason is because of DataTemplate boundaries. Google it if you are unfamiliar. These controls do not alter the behavior in any way, they just change the default ValueType to decimal and double. This is the entirity of the code...

using System.Windows;

namespace WPF.AA.CustomControls.DataTemplateControls
{
    public class NumericUpDownDecimal : NumericUpDown
    {
        static NumericUpDownDecimal()
        {
            ValueTypeProperty.OverrideMetadata(typeof(NumericUpDownDecimal), new PropertyMetadata(NumericUpDownType.Decimal));
        }
    }
}

As you can see all we do is override the ValueType property, everything else will be the same...including the UI. You can use these variants anywhere but they are required in DataTemplates if you want something other than Integer. Assignments and bindings will fail because of the coercion mechanism, it will try to use integers to do the math instead of decimals or doubles.

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.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
1.0.20 89 4/15/2024
1.0.19 82 3/31/2024
1.0.18 71 3/31/2024
1.0.17 80 3/31/2024
1.0.16 67 3/31/2024
1.0.15 69 3/31/2024
1.0.14 74 3/31/2024
1.0.13 74 3/31/2024
1.0.12 77 3/30/2024
1.0.11 75 3/23/2024
1.0.10 84 3/18/2024
1.0.9 95 3/16/2024
1.0.8 82 3/15/2024
1.0.7 92 2/24/2024
1.0.6 94 2/22/2024
1.0.5 152 11/10/2023
1.0.4 98 11/10/2023
1.0.3 100 11/10/2023
1.0.2 134 10/15/2023
1.0.1 104 10/15/2023
1.0.0 105 10/15/2023