Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.3.9" />
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.3.16" />
<PackageVersion Include="ChangelogAutomation.MSBuild" Version="3.0.5" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.2" />
<PackageVersion Include="Foq" Version="1.8.0" />
<PackageVersion Include="FSharp.Core" Version="$(FSCorePackageVersion)" />
<PackageVersion Include="FSharp.Core.Fluent-4.0" Version="1.0.0.6" />
<PackageVersion Include="Microsoft.DotNet.GenAPI" Version="7.0.0-beta.24266.2" />
<PackageVersion Include="Microsoft.Graphics.Win2D" Version="1.4.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.300" />
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.2.0" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.28000.1839" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="2.1.3" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.142" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="Nullable" Version="1.3.1" />
Expand All @@ -32,4 +37,4 @@
<PackageVersion Include="Avalonia.Direct2D1" Version="11.3.16" />
<PackageVersion Include="System.ValueTuple" Version="4.6.2" />
</ItemGroup>
</Project>
</Project>
85 changes: 49 additions & 36 deletions XamlMath.All.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2050
# Visual Studio Version 18
VisualStudioVersion = 18.6.11819.183 stable
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfMath.Example", "src\WpfMath.Example\WpfMath.Example.csproj", "{FB56A927-25E4-4EC9-BA36-3A843C606B34}"
EndProject
Expand All @@ -10,40 +9,40 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D9341AA3-BF7C-4CC1-8E11-82258967B82F}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.git-blame-ignore-revs = .git-blame-ignore-revs
.gitattributes = .gitattributes
.gitignore = .gitignore
LICENSE.md = LICENSE.md
README.md = README.md
CHANGELOG.md = CHANGELOG.md
MAINTAINERSHIP.md = MAINTAINERSHIP.md
NuGet.Config = NuGet.Config
Directory.Build.props = Directory.Build.props
.gitattributes = .gitattributes
Directory.Packages.props = Directory.Packages.props
.git-blame-ignore-revs = .git-blame-ignore-revs
LICENSE.md = LICENSE.md
MAINTAINERSHIP.md = MAINTAINERSHIP.md
NuGet.Config = NuGet.Config
README.md = README.md
renovate.json = renovate.json
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "WpfMath.Tests", "src\WpfMath.Tests\WpfMath.Tests.fsproj", "{F19E5FB1-EE6B-4A48-A522-41F30676BE41}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{39669369-C4F6-4AC6-9D35-B4B6086FF172}"
ProjectSection(SolutionItems) = preProject
docs\colors.md = docs\colors.md
docs\licensing-history.md = docs\licensing-history.md
docs\blurred-text-issue.md = docs\blurred-text-issue.md
docs\cleartype.png = docs\cleartype.png
docs\colors.md = docs\colors.md
docs\default.png = docs\default.png
docs\matrices.md = docs\matrices.md
docs\prepare-font.md = docs\prepare-font.md
docs\environments.md = docs\environments.md
docs\example-screenshot.png = docs\example-screenshot.png
docs\licensing-history.md = docs\licensing-history.md
docs\matrices.md = docs\matrices.md
docs\prepare-font.md = docs\prepare-font.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{BE4BA1DB-B8BC-4718-AA9D-23B0191C9323}"
ProjectSection(SolutionItems) = preProject
scripts\approve-all.ps1 = scripts\approve-all.ps1
scripts\verify-encoding.ps1 = scripts\verify-encoding.ps1
scripts\Get-Version.ps1 = scripts\Get-Version.ps1
EndProjectSection
ProjectSection(SolutionItems) = preProject
scripts\approve-all.ps1 = scripts\approve-all.ps1
scripts\Get-Version.ps1 = scripts\Get-Version.ps1
scripts\verify-encoding.ps1 = scripts\verify-encoding.ps1
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvaloniaMath", "src\AvaloniaMath\AvaloniaMath.csproj", "{945C8E20-AE99-493E-8A0D-D5880272050B}"
EndProject
Expand All @@ -52,10 +51,10 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvaloniaMath.Example", "src\AvaloniaMath.Example\AvaloniaMath.Example.csproj", "{4D9FD5DA-DA8C-4513-8783-413924A76D62}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{B296A539-C985-43AB-B740-7FBE8F85CCFF}"
ProjectSection(SolutionItems) = preProject
.github\workflows\main.yml = .github\workflows\main.yml
.github\workflows\nuget.yml = .github\workflows\nuget.yml
EndProjectSection
ProjectSection(SolutionItems) = preProject
.github\workflows\main.yml = .github\workflows\main.yml
.github\workflows\nuget.yml = .github\workflows\nuget.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlMath.Shared", "src\XamlMath.Shared\XamlMath.Shared.csproj", "{C9B5E02E-04FB-405F-9BEB-6CF4736939EB}"
EndProject
Expand All @@ -73,24 +72,24 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvaloniaMath.ApiTest", "src
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{3F2FED19-93A5-440C-B036-FE4A2FBCC49A}"
ProjectSection(SolutionItems) = preProject
api\AvaloniaMath.netstandard2.0.verified.cs = api\AvaloniaMath.netstandard2.0.verified.cs
api\XamlMath.Shared.netstandard2.0.verified.cs = api\XamlMath.Shared.netstandard2.0.verified.cs
api\WpfMath.net462.verified.cs = api\WpfMath.net462.verified.cs
api\AvaloniaMath.net462.verified.cs = api\AvaloniaMath.net462.verified.cs
api\XamlMath.Shared.net462.verified.cs = api\XamlMath.Shared.net462.verified.cs
api\AvaloniaMath.net8.0.verified.cs = api\AvaloniaMath.net8.0.verified.cs
api\AvaloniaMath.netstandard2.0.verified.cs = api\AvaloniaMath.netstandard2.0.verified.cs
api\ExcludedAttributes.txt = api\ExcludedAttributes.txt
api\WpfMath.net462.verified.cs = api\WpfMath.net462.verified.cs
api\WpfMath.net8.0.verified.cs = api\WpfMath.net8.0.verified.cs
api\AvaloniaMath.net8.0.verified.cs = api\AvaloniaMath.net8.0.verified.cs
api\XamlMath.Shared.net462.verified.cs = api\XamlMath.Shared.net462.verified.cs
api\XamlMath.Shared.net8.0.verified.cs = api\XamlMath.Shared.net8.0.verified.cs
api\XamlMath.Shared.netstandard2.0.verified.cs = api\XamlMath.Shared.netstandard2.0.verified.cs
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tool.TTFMetrics", "src\Tool.TTFMetrics\Tool.TTFMetrics.csproj", "{A29B12C8-9AE6-4016-9AB8-702B67409C95}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fonts", "fonts", "{766B0CFB-741E-4ACB-963C-FA76133927D3}"
ProjectSection(SolutionItems) = preProject
fonts\cmr10.ttf = fonts\cmr10.ttf
fonts\cmex10.ttf = fonts\cmex10.ttf
fonts\cmmi10.ttf = fonts\cmmi10.ttf
fonts\cmr10.ttf = fonts\cmr10.ttf
fonts\cmsy10.ttf = fonts\cmsy10.ttf
fonts\jlm_msam10.ttf = fonts\jlm_msam10.ttf
fonts\LICENSES.md = fonts\LICENSES.md
Expand All @@ -101,6 +100,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlMath.Shared.ApiTest", "
{C9B5E02E-04FB-405F-9BEB-6CF4736939EB} = {C9B5E02E-04FB-405F-9BEB-6CF4736939EB}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUIMath", "src\WinUIMath\WinUIMath.csproj", "{3F03950D-F8D0-4F9E-AEE7-B2356BB7F21A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUIMath.Example", "src\WinUIMath.Example\WinUIMath.Example.csproj", "{C42BCDD6-B2FA-4CB3-B645-DAF73A1BCCC6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -119,14 +122,6 @@ Global
{F19E5FB1-EE6B-4A48-A522-41F30676BE41}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F19E5FB1-EE6B-4A48-A522-41F30676BE41}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F19E5FB1-EE6B-4A48-A522-41F30676BE41}.Release|Any CPU.Build.0 = Release|Any CPU
{C9B5E02E-04FB-405F-9BEB-6CF4736939EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9B5E02E-04FB-405F-9BEB-6CF4736939EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9B5E02E-04FB-405F-9BEB-6CF4736939EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9B5E02E-04FB-405F-9BEB-6CF4736939EB}.Release|Any CPU.Build.0 = Release|Any CPU
{3FC6007E-5400-42FB-AD7A-727ADFAB6469}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FC6007E-5400-42FB-AD7A-727ADFAB6469}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3FC6007E-5400-42FB-AD7A-727ADFAB6469}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3FC6007E-5400-42FB-AD7A-727ADFAB6469}.Release|Any CPU.Build.0 = Release|Any CPU
{945C8E20-AE99-493E-8A0D-D5880272050B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{945C8E20-AE99-493E-8A0D-D5880272050B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{945C8E20-AE99-493E-8A0D-D5880272050B}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -135,6 +130,14 @@ Global
{4D9FD5DA-DA8C-4513-8783-413924A76D62}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D9FD5DA-DA8C-4513-8783-413924A76D62}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D9FD5DA-DA8C-4513-8783-413924A76D62}.Release|Any CPU.Build.0 = Release|Any CPU
{C9B5E02E-04FB-405F-9BEB-6CF4736939EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9B5E02E-04FB-405F-9BEB-6CF4736939EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9B5E02E-04FB-405F-9BEB-6CF4736939EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9B5E02E-04FB-405F-9BEB-6CF4736939EB}.Release|Any CPU.Build.0 = Release|Any CPU
{3FC6007E-5400-42FB-AD7A-727ADFAB6469}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FC6007E-5400-42FB-AD7A-727ADFAB6469}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3FC6007E-5400-42FB-AD7A-727ADFAB6469}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3FC6007E-5400-42FB-AD7A-727ADFAB6469}.Release|Any CPU.Build.0 = Release|Any CPU
{204E2BD3-05C6-41E0-998F-0E0AC1530DCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{204E2BD3-05C6-41E0-998F-0E0AC1530DCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{204E2BD3-05C6-41E0-998F-0E0AC1530DCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -151,6 +154,16 @@ Global
{61B897BB-B64C-4E63-8FD4-F083A22EF58C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61B897BB-B64C-4E63-8FD4-F083A22EF58C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{61B897BB-B64C-4E63-8FD4-F083A22EF58C}.Release|Any CPU.Build.0 = Release|Any CPU
{3F03950D-F8D0-4F9E-AEE7-B2356BB7F21A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F03950D-F8D0-4F9E-AEE7-B2356BB7F21A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F03950D-F8D0-4F9E-AEE7-B2356BB7F21A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F03950D-F8D0-4F9E-AEE7-B2356BB7F21A}.Release|Any CPU.Build.0 = Release|Any CPU
{C42BCDD6-B2FA-4CB3-B645-DAF73A1BCCC6}.Debug|Any CPU.ActiveCfg = Debug|x64
{C42BCDD6-B2FA-4CB3-B645-DAF73A1BCCC6}.Debug|Any CPU.Build.0 = Debug|x64
{C42BCDD6-B2FA-4CB3-B645-DAF73A1BCCC6}.Debug|Any CPU.Deploy.0 = Debug|x64
{C42BCDD6-B2FA-4CB3-B645-DAF73A1BCCC6}.Release|Any CPU.ActiveCfg = Release|x64
{C42BCDD6-B2FA-4CB3-B645-DAF73A1BCCC6}.Release|Any CPU.Build.0 = Release|x64
{C42BCDD6-B2FA-4CB3-B645-DAF73A1BCCC6}.Release|Any CPU.Deploy.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
16 changes: 16 additions & 0 deletions src/WinUIMath.Example/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Application
x:Class="WinUIMath.Example.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinUIMath.Example">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->
</ResourceDictionary>
</Application.Resources>
</Application>
52 changes: 52 additions & 0 deletions src/WinUIMath.Example/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using Microsoft.UI.Xaml.Shapes;

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;

using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;

// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.

namespace WinUIMath.Example
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : Application
{
private Window? _window;

/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
InitializeComponent();
}

/// <summary>
/// Invoked when the application is launched.
/// </summary>
/// <param name="args">Details about the launch request and process.</param>
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
_window = new MainWindow();
_window.Activate();
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/WinUIMath.Example/Assets/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions src/WinUIMath.Example/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8" ?>
<Window
x:Class="WinUIMath.Example.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:WinUIMath.Example"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="using:WinUIMath.Example.Views"
xmlns:vm="using:WinUIMath.Example.ViewModels"
Title="WinUIMath.Example"
mc:Ignorable="d">

<Window.SystemBackdrop>
<MicaBackdrop />
</Window.SystemBackdrop>

<NavigationView
ActualThemeChanged="OnActualThemeChanged"
Loaded="OnLoaded"
IsBackButtonVisible="Collapsed"
IsBackEnabled="False"
IsSettingsVisible="False"
MenuItemsSource="{x:Bind ViewModel.Presets}"
SelectedItem="{x:Bind ViewModel.SelectedPreset, Mode=TwoWay}"
SelectionChanged="OnSelectionChanged">
<NavigationView.MenuItemTemplate>
<DataTemplate x:DataType="vm:PresetViewModel">
<NavigationViewItem Icon="Placeholder" ToolTipService.ToolTip="{x:Bind Formula}">
<StackPanel Margin="8" Spacing="2">
<TextBlock Text="{x:Bind Name}" />
<TextBlock
MaxLines="1"
Opacity="0.5"
Text="{x:Bind Formula}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap" />
</StackPanel>
</NavigationViewItem>
</DataTemplate>
</NavigationView.MenuItemTemplate>
<views:FormulaPresetView x:Name="PART_FormulaPresetView" />
</NavigationView>

</Window>
54 changes: 54 additions & 0 deletions src/WinUIMath.Example/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

using WinUIMath.Example.ViewModels;

namespace WinUIMath.Example;

public sealed partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}

private MainViewModel ViewModel => field ?? new();

private void OnLoaded(object sender, RoutedEventArgs e)
{
switch (((FrameworkElement)sender).ActualTheme)
{
case ElementTheme.Light:
AppWindow.TitleBar.PreferredTheme = Microsoft.UI.Windowing.TitleBarTheme.Light;
break;
case ElementTheme.Dark:
AppWindow.TitleBar.PreferredTheme = Microsoft.UI.Windowing.TitleBarTheme.Dark;
break;
default:
break;
}
}

private void OnSelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
{
if (args.IsSettingsSelected)
return;

PART_FormulaPresetView.Preset = args.SelectedItem as PresetViewModel;
}

private void OnActualThemeChanged(FrameworkElement sender, object args)
{
switch (sender.ActualTheme)
{
case ElementTheme.Light:
AppWindow.TitleBar.PreferredTheme = Microsoft.UI.Windowing.TitleBarTheme.Light;
break;
case ElementTheme.Dark:
AppWindow.TitleBar.PreferredTheme = Microsoft.UI.Windowing.TitleBarTheme.Dark;
break;
default:
break;
}
}
}
Loading