Oakrey.Applications.About
3.0.4
dotnet add package Oakrey.Applications.About --version 3.0.4
NuGet\Install-Package Oakrey.Applications.About -Version 3.0.4
<PackageReference Include="Oakrey.Applications.About" Version="3.0.4" />
<PackageVersion Include="Oakrey.Applications.About" Version="3.0.4" />
<PackageReference Include="Oakrey.Applications.About" />
paket add Oakrey.Applications.About --version 3.0.4
#r "nuget: Oakrey.Applications.About, 3.0.4"
#:package Oakrey.Applications.About@3.0.4
#addin nuget:?package=Oakrey.Applications.About&version=3.0.4
#tool nuget:?package=Oakrey.Applications.About&version=3.0.4
Oakrey.Applications.About
A WPF/.NET 10 library that provides a ready-to-use About dialog for desktop applications. It covers application identity display, loaded assembly/module version listing, RTF EULA rendering, and a Report Issue form with direct log folder access.
Main features
- Application info display � binds application
Name,Version, and currentYearfromIApplicationInfo - Module version listing � enumerates all loaded assemblies/modules in the current
AppDomain; optionally filters outSystem.*andMicrosoft.*assemblies viaSystemModuleVisible - RTF EULA rendering � reads
Assets/eula.rtfat startup, converts it to plain text, and exposes it for binding; gracefully handles missing or unreadable files with logged warnings - Report Issue form � a WPF
DarkWindowdialog that exposes the application log directory path and allows the user to open the log folder in Explorer - MVVM-ready ViewModel �
AboutViewModelimplementsINotifyPropertyChangedandIAutoConfigurable; provides aReportIssueICommand - Telemetry � all ViewModel and service operations are traced via
Oakrey.Telemetry
Architecture
classDiagram
IAboutService <|.. AboutService
AboutService --> ModuleVersion : produces
AboutViewModel --> IAboutService : consumes
AboutViewModel --> IApplicationInfo : consumes
AboutViewModel --> ReportIssueForm : opens on command
ReportIssueForm --> IApplicationInfo : reads LogDirectoryPath
| Type | Role |
|---|---|
IAboutService |
Abstraction for module version retrieval; inject this in application code |
AboutService |
Scans AppDomain.CurrentDomain.GetAssemblies(); respects SystemModuleVisible flag |
ModuleVersion |
Record holding a module Name and Version |
AboutViewModel |
INPC ViewModel; exposes Name, Version, Year, EulaRtf, Modules, ReportIssue |
ReportIssueForm |
WPF dialog (DarkWindow); shows log path and opens log folder in Explorer |
Requirements
- .NET 10 (Windows)
- WPF host application
Oakrey.ViewModels>= 2.1.0Oakrey.Telemetry>= 2.0.1Oakrey.Applications(providesIApplicationInfo)
Installation
NuGet Package Manager
- Open your project in Visual Studio.
- Navigate to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.
- Search for
Oakrey.Applications.Aboutand click Install.
.NET CLI
dotnet add package Oakrey.Applications.About
Package Manager Console
Install-Package Oakrey.Applications.About
Configuration
Register the About services during application startup:
services.AddSingleton<IAboutService, AboutService>();
services.AddTransient<ReportIssueForm>();
// AboutViewModel is resolved by the ViewModelProvider; no explicit registration needed
// if using Oakrey.Applications ViewModelProvider auto-configuration.
AboutService and ReportIssueForm both depend on IApplicationInfo, which must be registered separately.
Example usage
DI setup
services.AddSingleton<IApplicationInfo, MyAppInfo>();
services.AddSingleton<IAboutService, AboutService>();
services.AddTransient<ReportIssueForm>();
XAML page
<Page xmlns:vm="clr-namespace:Oakrey.Applications.About;assembly=Oakrey.Applications.About"
xmlns:vmp="clr-namespace:Oakrey.Applications;assembly=Oakrey.Applications.Base"
d:DataContext="{d:DesignInstance Type=vm:AboutViewModel, IsDesignTimeCreatable=True}"
DataContext="{vmp:ViewModelProvider vm:AboutViewModel}">
<StackPanel>
<TextBlock>
<Run Text="Application: " /><Run Text="{Binding Name, Mode=OneWay}" />
<LineBreak />
<Run Text="Version: " /><Run Text="{Binding Version, Mode=OneWay}" />
<LineBreak />
<Run Text="Copyright � " /><Run Text="{Binding Year, Mode=OneWay}" />
</TextBlock>
<Button Content="Report Issue" Command="{Binding ReportIssue}" />
<TextBlock Text="{Binding EulaRtf, Mode=OneWay}" TextWrapping="Wrap" />
<DataGrid ItemsSource="{Binding Modules}" AutoGenerateColumns="False" IsReadOnly="True">
<DataGrid.Columns>
<DataGridTextColumn Header="Module" Binding="{Binding Name}" />
<DataGridTextColumn Header="Version" Binding="{Binding Version}" />
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</Page>
EULA file placement
Place the EULA as an RTF file in the application output directory:
{AppBaseDirectory}/
Assets/
eula.rtf
If the file is missing, AboutViewModel logs a warning and sets EulaRtf to "EULA file not found.".
Development notes
AboutViewModelhas a default parameterless constructor that usesnew AboutService()andnew DummyAppInfo()to support design-time rendering in Visual Studio. It logs a warning when this path is taken.AboutService.SystemModuleVisibledefaults totrue. Set it tofalsebefore first access toModulesto suppressSystem.*andMicrosoft.*assemblies from the list. The result is lazy-evaluated and cached.ReportIssueForminherits fromDarkWindow(fromOakrey.Applications.UI). It opens the log directory viaexplorer.exeusingProcess.StartwithUseShellExecute = true.
License
MIT � Copyright � Oakrey 2016-present
- Repository: ApplicationServices
- Project URL: oakrey.cz
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
- Oakrey.Applications.Base (>= 4.0.3)
- Oakrey.Applications.UI (>= 3.0.5)
- Oakrey.Applications.ViewModels (>= 2.0.3)
- Oakrey.Telemetry (>= 2.0.1)
- Oakrey.ViewModels (>= 2.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.