Migrate GUI from WPF to Avalonia for cross-platform support#82
Open
Migrate GUI from WPF to Avalonia for cross-platform support#82
Conversation
- Replace PathLengthCheckerGUI WPF project with Avalonia 11.2 equivalent - New App.axaml/cs, MainWindow.axaml/cs using Avalonia APIs - New Program.cs Avalonia entry point with AppBuilder - MainWindowViewModel (MVVM pattern with INotifyPropertyChanged) - AppSettings.cs: JSON-based settings replacing Properties.Settings.Default - MessageBoxHelper.cs: cross-platform dialog built on Avalonia primitives - SplitButton + Flyout replaces Extended.WPF.Toolkit SplitButton - NumericUpDown replaces Extended.WPF.Toolkit IntegerUpDown - StorageProvider.OpenFolderPickerAsync replaces WinForms FolderBrowserDialog - TopLevel.Clipboard replaces WPF Clipboard - Process.Start with UseShellExecute for cross-platform file explorer open - Migrate all projects from .NET Framework 4.5.2 legacy csproj to SDK-style targeting net8.0 - Replace AlphaFS dependency with System.IO.EnumerationOptions (IgnoreInaccessible + AttributesToSkip = ReparsePoint) - Fix test fixture: close FileStream from File.Create() to prevent cleanup failures on .NET 8 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Avalonia? I loved her singing on Prince's Purple Rain album. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Converts the
PathLengthCheckerGUIproject from WPF (.NET Framework 4.5.2) to Avalonia 11.2 targeting net8.0, making the application runnable on Windows, macOS, and Linux.Changes
PathLengthCheckerGUI (complete rewrite)
App.xaml/App.xaml.csApp.axaml/App.axaml.csMainWindow.xaml/MainWindow.xaml.csMainWindow.axaml/MainWindow.axaml.csSplitButtonSplitButton+FlyoutIntegerUpDownNumericUpDownWinForms.FolderBrowserDialogStorageProvider.OpenFolderPickerAsyncSystem.Windows.ClipboardTopLevel.ClipboardProperties.Settings.Default(app.config)AppSettings.cs— JSON file in%APPDATA%ApplicationSettingsBindingExtensionWPF.MessageBox.ShowMessageBoxHelper(custom AvaloniaWindow)MainWindowViewModel+ code-behindDependencyPropertyNew files:
Program.cs— AvaloniaAppBuilderentry pointAppSettings.cs— Cross-platform JSON settings persistenceMessageBoxHelper.cs— Lightweight dialog helper using native Avalonia controlsViewModels/MainWindowViewModel.cs— All search state and business logicPathLengthChecker (core library)
.csprojto SDK-style targetingnet8.0System.IO.EnumerationOptions(IgnoreInaccessible = true,AttributesToSkip = ReparsePoint) — removes a Windows-only dependencyPathLengthChecker.Tests
.csprojto SDK-style targetingnet8.0File.Create()without.Close()that caused test cleanup failures on .NET 8All projects: SDK-style csproj, net8.0
Verified
dotnet build)