RussJudge.WPFControlsAndStylizer 1.1.2

dotnet add package RussJudge.WPFControlsAndStylizer --version 1.1.2
                    
NuGet\Install-Package RussJudge.WPFControlsAndStylizer -Version 1.1.2
                    
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="RussJudge.WPFControlsAndStylizer" Version="1.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RussJudge.WPFControlsAndStylizer" Version="1.1.2" />
                    
Directory.Packages.props
<PackageReference Include="RussJudge.WPFControlsAndStylizer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RussJudge.WPFControlsAndStylizer --version 1.1.2
                    
#r "nuget: RussJudge.WPFControlsAndStylizer, 1.1.2"
                    
#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.
#:package RussJudge.WPFControlsAndStylizer@1.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RussJudge.WPFControlsAndStylizer&version=1.1.2
                    
Install as a Cake Addin
#tool nuget:?package=RussJudge.WPFControlsAndStylizer&version=1.1.2
                    
Install as a Cake Tool

RussJudge.WPFControlsAndStylizer

This project is for primarily offering a ResourceDictionary for common stylizing of various WPF controls. It also offers controls that are not available through standard WPF functionality, such as an activity indicator.

This initial publish does not offer much, but more will be added as needed by the developer.

For an example of how to use this, see the example project at https://github.com/russjudge/RussJudge.WPFControlsAndStylizer

Styles

Colors

These colors can be overridden in Resources to change colors of choice.

Color Description
AttentionColor Used on mouse-over on Window title bar on DialogWindowStyle and StandardWindowStyle.
PrimaryColor Used for the primary color style of all stylized controls.
PrimaryBorderColor Used for the primary border color style of all stylized controls.
PrimaryTextColor The primary foreground color.
PrimaryInverseTextColor The inverse primary color of the foreground.
HighlightColor Used as the center highlight color of the background of stylized controls.
BorderHightlightColor Used as the center highlight color of the background of the border of stylized controls.
SecondaryColor Used for the secondary color style of all stylized controls.
SecondaryBorderColor Used for the secondary color style for borders of all stylized controls.
PrimaryControlColor Primary background color of stylized controls.
HighlightControlColor Center highlight background color of stylized controls.
SecondaryControlColor Secondary background color of stylized controls.

Brushes

These brushes can be overridden in Resources to change colors of choice.

Brush Description
PrimaryBorderBrush Brush defined to PrimaryBorderColor. Used as default Color2 in the ActivityIndicator.
SecondaryBorderBrush Brush defined to SecondaryBorderColor. Used as default Color1 in the ActivityIndicator.
PrimaryTextBrush Brush defined to PrimaryTextColor, used on the titlebar of the stylized windows.
PrimaryInverseTextBrush Brush defined to PrimaryInverseTextColor, used on the titlebar of the stylized windows.
ControlBackgroundStyle Brush used for the background of controls (specifically ImportantButtonStyle).
BackgroundStyle Background style brush.
BorderStyle Border Style Brush
AttentionBrush Brush using AttentionColor.
ForegroundStyle Foreground brush using PrimaryTextColor.

Templates

DialogWindowStyle

Stylizes a window to behave like a dialog. If you use the attached property Attached.TitleContent, the object defined in Attached.TitleContent will be presented in the Title bar.

StandardWindowStyle

Stylizes a window. If you use the attached property Attached.TitleContent, the object defined in Attached.TitleContent will be presented in the Title bar.

ImportantButtonStyle

Stylizes a button to include animation on MouseOver.

TitleBarButtonStyle

Stylizes a button that is used in the TitleContent attached property.

Controls

ActivityIndicator

This control is merely a spinner to indicate activity. By default, it is hidden, and the Visibility is bound to its property "IsActive", which in turn is bound to the static property "IsActive" on RussJudge.WPFControlsAndStylizer.GlobalControl.Current. Set the Visibility to make it visible, or set "IsActive" on the ActivityIndicator to make it visible, or set RussJudge.WPFControlsAndStylizer.GlobalControl.Current.IsActive = true;

Using RussJudge.WPFControlsAndStylizer.GlobalControl.Current.IsActive allows for all ActivityIndicator controls on all open windows to appear and be controlled from a single location.

There are three color properties that can be stylized:

Property Description
EllipseBackground The background circle Default is the style key "White".
Color1 The primary color Default is the style key "PrimaryColor".
Color2 The secondary color Default is the style key "SecondaryColor".

By default, the ActivityIndicator is a circle. However, by setting the Height and Width differently, an elllipse is formed that will create a differently behaving activity indicator.

About

This is a standard "About" window, stylized with the "DialogWindowStyle" that displays properties from any given Assembly. The default Assembly is the Entry Assembly.
Open the About window with:

var optionalAssembly = System.Reflection.EntryAssembly;`

About.DisplayAbout("optional informational string", optionalAssembly);`

InputPromptDialog

This is a simplified dialog window for providing a prompt to accept a string from the user.

string? result = InputPromptDialog.ShowDialog();
if (result == null)
{
	//User selected "Cancel"
}
else
{
	//User entered a string for processing.
	string value = result;
}

TaskMonitor

This Singleton provides a mechanism for starting and monitoring background tasks, with the capability to cancel.

Tasks can be added by calling the AddTask method. The first parameter is a delegate that must accept a CancellationToken as its only parameter. This token can be ignored within the delegate, but can be used to allow controlled cancellation of the Task. The second parameter of AddTask is a simple description.

TaskMontior.Current.BackgroundProcesses is a bindable collection of running tasks.

Attached Properties

IsStylized

Set to true only if using the DialogWindowStyle or StandardWindowStyle. Setting this property causes the System Commands (Maximize, Minimize, Restore, Close) to be properly bound to the Window Titlebar Buttons. These buttons won't function without setting this attached property. Setting this is NOT required if TitleContent is set.

TitleContent

Content that will display on the Window Titlebar left of the Title on a Window using the DialogWindowStyle or StandardWindowStyle.

Placeholder

Setting this attached property on a TextBox will display the Placeholder over the empty area of the TextBox. This Placeholder disappears when focus is on the TextBox, or if the TextBox.Text has a value.

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

    • No dependencies.
  • net9.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.1.2 350 8/5/2025
1.1.1 286 8/4/2025
1.1.0 289 3/31/2025
1.0.4 248 3/18/2025
1.0.3 267 3/12/2025
1.0.2 246 10/4/2024
1.0.1 238 9/30/2024
1.0.0 208 9/30/2024

Fixed an issue with Maximize for windows with the StandardWindow style. Previous released fixed maximize if the maximize button was pressed, but there were still issues if maximzed by restoring from a minimized state, or maximizing by dragging the window to the border of the Desktop.  Like previously, it looks like Microsoft lacks competency in some areas, as I had to code work-arounds to their ineptness.