Oakrey.Applications.Resources.Modern
2.1.2
dotnet add package Oakrey.Applications.Resources.Modern --version 2.1.2
NuGet\Install-Package Oakrey.Applications.Resources.Modern -Version 2.1.2
<PackageReference Include="Oakrey.Applications.Resources.Modern" Version="2.1.2" />
<PackageVersion Include="Oakrey.Applications.Resources.Modern" Version="2.1.2" />
<PackageReference Include="Oakrey.Applications.Resources.Modern" />
paket add Oakrey.Applications.Resources.Modern --version 2.1.2
#r "nuget: Oakrey.Applications.Resources.Modern, 2.1.2"
#:package Oakrey.Applications.Resources.Modern@2.1.2
#addin nuget:?package=Oakrey.Applications.Resources.Modern&version=2.1.2
#tool nuget:?package=Oakrey.Applications.Resources.Modern&version=2.1.2
Oakrey.Applications.Resources.Modern
A WPF XAML resource library that provides centralized ResourceDictionary management with dark-themed control styles, predefined colour palettes, frozen brush sets, and scalable vector icons for consistent modern UI design.
- Package:
Oakrey.Applications.Resources.Modern - Target framework: .NET 10 (Windows / WPF)
- License: MIT
Main features
- Single entry-point
Resources.xamlthat merges all sub-dictionaries in the correct order. - Default implicit styles for 14 WPF controls (see list below).
- Two built-in dark colour palette themes:
DarkOakreyColours.xamlandDarkSkodaColours.xaml. - Frozen
SolidColorBrushresources for optimal rendering performance. - Named
DrawingImageicon set backed by path geometry (IconGeometry.xaml,Paths.xaml). - Utility styles:
FocusVisual,InvisibleHeaderStyle,LeftHeaderStyle,LogViewerStyle.
Project structure
Resources/
Resources.xaml # Entry point - merges all dictionaries
Colours.xaml # Base colour tokens
Brushes.xaml # Frozen SolidColorBrush set
DarkOakreyColours.xaml # Oakrey dark theme palette + brushes
DarkOakreyOpaqueColours.xaml # Opaque variant of the Oakrey palette
DarkSkodaColours.xaml # Skoda dark theme palette + brushes
DarkEntryColours.xaml # Colour overrides for entry controls
Paths.xaml # Raw path geometry data
IconGeometry.xaml # GeometryDrawing definitions
Icons.xaml # DrawingImage icon resources
Resources.Buttons.xaml
Resources.CheckBox.xaml
Resources.ComboBox.xaml
Resources.ContextMenu.xaml
Resources.DataGrid.xaml
Resources.DatePicker.xaml
Resources.Expander.xaml
Resources.GroupBox.xaml
Resources.Label.xaml
Resources.ListBox.xaml
Resources.ListView.xaml
Resources.RadioButton.xaml
Resources.ScrollBar.xaml
Resources.Slider.xaml
Resources.TextBlock.xaml
Resources.TextBox.xaml
Resources.ToolBar.xaml
Resources.TreeView.xaml
Requirements
- .NET 10 or higher
- Windows (WPF)
Installation
.NET CLI
dotnet add package Oakrey.Applications.Resources.Modern
Package Manager Console
Install-Package Oakrey.Applications.Resources.Modern
NuGet Package Manager
- Open Visual Studio.
- Navigate to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.
- Search for
Oakrey.Applications.Resources.Modernand click Install.
Usage
Applying all resources globally
Merge Resources.xaml into your application's App.xaml:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Oakrey.Applications.Resources.Modern;component/Resources.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
All implicit control styles are applied automatically once the dictionary is merged.
Applying a specific theme palette
To use one of the built-in dark palettes instead of the base Colours.xaml, merge the desired theme before Brushes.xaml and the control style dictionaries:
<ResourceDictionary Source="pack://application:,,,/Oakrey.Applications.Resources.Modern;component/DarkOakreyColours.xaml"/>
Available palettes:
| File | Accent colour |
|---|---|
DarkOakreyColours.xaml |
Blue #FC A900 |
DarkSkodaColours.xaml |
Green #4B A92E |
Using icons
Icons are exposed as DrawingImage resources and can be bound directly to Image.Source:
<Image Source="{StaticResource IconSettings}" Width="24" Height="24"/>
Named brush keys
The following semantic brush keys are defined by both dark palette files and can be used with StaticResource or DynamicResource:
| Key | Purpose |
|---|---|
ForeColourBrush |
Primary foreground text |
ForeDisabledColourBrush |
Disabled foreground |
BackgroundMainBrush |
Window / panel background |
BackgroundSecondaryBrush |
Secondary surface |
ComponentMainBrush |
Control background (normal) |
ComponentSecondaryBrush |
Control background (secondary) |
ComponentDisabledBrush |
Control background (disabled) |
ComponentTertiaryBrush |
Control background (hover) |
AccentColourBrush |
Primary accent / highlight |
ComponentSelectedBrush |
Selected item indicator |
Architecture
graph TD
App_xaml["App.xaml"] --> Resources_xaml["Resources.xaml (entry point)"]
Resources_xaml --> Colours["Colours.xaml"]
Resources_xaml --> Brushes["Brushes.xaml"]
Resources_xaml --> Icons["Icons.xaml"]
Resources_xaml --> Controls["Control style dictionaries (x14)"]
Icons --> Paths["Paths.xaml"]
Icons --> IconGeometry["IconGeometry.xaml"]
Brushes --> Colours
ThemeOverride["Theme palette (optional)\nDarkOakreyColours / DarkSkodaColours"] -. "merged before Resources.xaml" .-> App_xaml
Control style files provide implicit default styles; they override nothing outside their declared TargetType. All brushes are frozen at declaration time using PresentationOptions:Freeze="True" for rendering performance.
Development notes
- To add a new theme palette, create a new
ResourceDictionarythat defines the standard semantic colour and brush keys listed in the brush key table above. No changes toResources.xamlare required. - Icon geometry is defined in
IconGeometry.xamlusingGeometryDrawing. Add new entries there and expose them asDrawingImageinIcons.xaml. - All colour values are defined as
Colorresources; brushes are derived from them. Avoid hard-coding colour values in control style files.
Project information
- Author: Oakrey
- Company: Oakrey
- License: MIT
- NuGet: Oakrey.Applications.Resources.Modern
- Repository: Azure DevOps
Contributions are welcome! Feel free to open issues or submit pull requests to improve the package.
License
This project is licensed under the MIT License. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Oakrey.Applications.Resources.Modern:
| Package | Downloads |
|---|---|
|
Oakrey.Applications.UI
WPF UI library providing a DarkWindow base class with native DWM Mica and Acrylic backdrops, a TabbedWindow with animated page transitions and Windows light/dark theme detection, a notification bar service, and severity-typed message box and prompt dialogs. |
GitHub repositories
This package is not used by any popular GitHub repositories.