Table of Contents
The StatisticsViewer project is part of a series of projects exploring XAML, C#, UWP & WinUI, and C++ WinRT.
The StatisticsViewerWinUI application is a port of the original StatsViewer Windows MFC Application. The purpose of this application is to demonstrate component interoperability. The application uses a Windows Runtime Component (StatisticsLibraryWRC) that wraps a native C++ statistics library offering simple descriptive statistics and statistical hypothesis tests. The component stack is described in the StatisticsLibrary project.
The StatisticsViewer solution consists of two projects.
The StatisticsConsole is a minimal C# console application that is used to check that the StatisticsLibraryWRC component can be referenced correctly via packages rather than directly in the project dependencies. It also checks that the StatisticsLibraryWRC can be used to run some simple test functions.
The StatisticsViewerWinUI is the windows desktop application that makes use of the functionality provided by the StatisticsLibraryWRC. The usage is described below.
- Visual Studio 2022
- C# (targeting .NET 6.0)
- WinUI3
The following packages are required:
- CommunityToolkit.Mvvm 8.2.1
- CommunityToolkit.WinUI.UI.Controls.DataGrid 7.1.2
- Microsoft.Extensions.DependencyInjection 7.0.0
- Microsoft.NETCore.UniversalWindowsPlatform 6.2.14
- Microsoft.Windows.CsWinRT 2.0.3
- Microsoft.Windows.SDK.BuildTools 10.0.25188-preview
- Microsoft.Windows.AppSDK 1.4.230913002
- StatisticsLibraryWRC 0.1.0-prerelease
The project can be downloaded from the GitHub repository in the usual way.
See the packages listed above.
There are no specific installation instructions. Ensure that the NuGet package manager package sources has an entry pointing to the location of the StatisticsLibraryWRC.
The StatisticsViewer is a Windows desktop application that performs descriptive statistics and statistical tests on selected data sets.
This application is written in C# and uses WinUI3 controls. It demonstrates:
- data binding to a DataGrid control
- data binding to a ListView control
- a simple traditional menu bar
- dialog boxes based on content dialog
- a tailored MVVM architecture
Open the application, and select File, Open. Choose one of the data files from .\SoftwareInteroperability\Data (e.g. jp-mpg.txt) and open it. The data are displayed in the list on the left-hand side.
Repeat with the following data sets: us-mpg.txt, ftest-x1.txt, ftest-x2.txt. These are added to the display (and to the underlying data manager).
From the Statistics menu, select Descriptive. The Descriptive Statistics dialog box is displayed with a list of available datasets for which this request can be made.
Select us-mpg
and press OK. The summary desriptive statistics are displayed in the Results panel on the right-hand side. These can be copied to the clipboard.
From the Statistics menu, select Two-sample FTest. The Two-sample FTest dialog box is displayed with a list of available datasets for which this request can be made. Select the x1 and x2 datasets and press OK.
The results of the two-sample F-test are displayed.
Select File > Exit to close the application.
Future directions:
- Add Changelog
See the open issues for a full list of proposed features (and known issues).
Distributed under the GPL-3.0 License. See LICENSE.md
for more information.
Adam Gladstone - (https://www.linkedin.com/in/adam-gladstone-b6458b156/) Project Link: StatisticsViewer
Helpful resources