-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port from WPF to Avalonia #361
Merged
Merged
Changes from 12 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
370ad0d
WIP: avalonia port
Mrxx99 87f503b
added UserControlBase to not have to add DoNotNotifyAttribute to ever…
Mrxx99 66e3b57
small fix
Mrxx99 6a782ae
Merge from develop
Mrxx99 e6f8190
removed WPF Stylet reference
Mrxx99 6b27939
display window icon
Mrxx99 59e31bb
fixed query textbox background
Mrxx99 df71416
Update YoutubeDownloader/YoutubeDownloader.csproj
Mrxx99 b132dfa
implemented some feedback
Mrxx99 71df82d
removed vs files
Mrxx99 b1c931f
Merge branch 'feature/avalonia-port' of https://github.com/Mrxx99/You…
Mrxx99 b6dfe67
Merge branch 'master' into feature/avalonia-port
Mrxx99 8ec0ba2
updated to avalonina 11.0.4
Mrxx99 ad75a3c
removed MessageBox.Avalonia package since it's not used
Mrxx99 ca8728b
updated Material.Avalonia to latest nightly
Mrxx99 c4a4f51
use async Task instead of async void and normal binding instead of st…
Mrxx99 90ed00b
try webview with CefGlue
Mrxx99 7070c55
Merge branch 'master' into feature/avalonia-port
Tyrrrz 4d6503f
updated dependencies
Mrxx99 8197224
Merge remote-tracking branch 'origin/feature/avalonia-port' into feat…
Mrxx99 f9ef424
resolve merge conflicts
Mrxx99 a37523a
fixed csproj
Mrxx99 59f8ba6
updated Avalonia dependencies
Mrxx99 0d6c6ef
fixed search textbox theme issue
Mrxx99 daeb1f7
Merge remote-tracking branch 'origin/master' into feature/avalonia-port
Mrxx99 097073a
missing merge in SettingsView
Mrxx99 021903e
remove leftover exception handler from WPF
Mrxx99 69ae19b
working auth on Windows
Mrxx99 b1523bb
some setting fixes
Mrxx99 220c768
remove Stylet.Avalonia
Mrxx99 fb33cd4
fix formatting
Mrxx99 475f6db
fix scrollbar visible in query textbox
Mrxx99 2ec3918
fix not displaying title
Mrxx99 4e9053f
fix margin of ProcessQueryButton
Mrxx99 16a281d
improved style of file name template textbox
Mrxx99 a158bf2
some cleanup and improvements
Mrxx99 7fbad0e
properly getting dark mode of platform
Mrxx99 56acb0e
add missing close button in settings
Mrxx99 84e2713
removed unused control
Mrxx99 8941e6f
enabled compiled bindings
Mrxx99 386bcf0
disable close on clickaway for the popups
Mrxx99 157776f
calling copy error message when clicking on failure status
Mrxx99 18ec0ba
fixed wrongly using accent color on datagrid buttons
Mrxx99 bd1c358
remove commented out, not required line
Mrxx99 4b4c6e0
disable main grid when popup is open
Mrxx99 4b97414
disabled compiled bindings because of bug with generics
Mrxx99 eff89a9
updated Material.Avalonia to 3.4.1 to fix theme change issue
Mrxx99 4bbe9fa
removed unused xaml namespaces
Mrxx99 88d778e
improved getting toplevel
Mrxx99 ab96b5b
fix unsubscribing from event when view unloaded
Mrxx99 52af6f5
fix dialog result not recognized from command parameter
Mrxx99 1d9d14d
updated Material.Avalonia to 3.4.2 to include snackbar layout fix
Mrxx99 caac0fd
Update YoutubeDownloader/app.manifest
Mrxx99 f24c85e
renamed SnackbarService.PostDefault to Post
Mrxx99 47c471a
use MVVM toolkit commands for binding to methods
Mrxx99 69f5ffe
using AcitvatorUtilities.GetServiceOrCreateInstance to be able to res…
Mrxx99 4afc9e9
make ViewModelAwareUserControl generic, introduce ViewModel property
Mrxx99 880504e
removed not needed WebBrowser_OnNavigationCompleted event handler
Mrxx99 a100302
simplify logout button
Mrxx99 d66dd9e
remove unused WebView event handler
Mrxx99 fd72e7b
add Async PostFix and fix commands
Mrxx99 e1d4189
set application icon
Mrxx99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
96 changes: 0 additions & 96 deletions
96
YoutubeDownloader/Behaviors/MultiSelectionListBoxBehavior.cs
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
YoutubeDownloader/Behaviors/VideoMultiSelectionListBoxBehavior.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason you merged the bootstrapper with the App?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because it seems like these were merged in Stylet.Avalonia https://github-com.translate.goog/sealoyal2018/Stylet.Avalonia?_x_tr_sl=auto&_x_tr_tl=de&_x_tr_hl=de
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we need Stylet at all? I remember we discussed this and you said Avalonia already provides many of its features out of the box (such as method binding). Does Avalonia have something for binding views to view models automatically too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had started first without Stylet because it was still lacking behind in Avalonia previews when Avalonia 11 was still in preview. But since somethings changed with Avalonia till the release and also YoutubeDownloader moved forward I somewhat started again to not miss any of the changes. When I started again I used Stylet.Avalonia because it was faster. But I can again migrate of it. A drawback of the Stylet.Avalonia (which is a independet fork of Stylet) is also that is completey switched its readme to Chinese only.
Yes Avalonia has some parts already build in like binding to methods form commands (not from events) and one can easily build a general ViewLocator which is provided with the MVVM templates. I can change to that approach together with CommunityToolkit.MVVM from microsoft for some MVVM stuff. But I ended up rebuild some parts of Stylet, it would not be a problem for me since I had done that already.
You can also look at my first attempt here: https://github.dev/Mrxx99/YoutubeDownloader/tree/Avalonia/YoutubeDownloader.Avaloniav11
We could also wait until Caliburn.Micro is released (officially) for Avalonia which should be (hopefully) soon: Caliburn-Micro/Caliburn.Micro#851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty ambivalent, I think. We already have some "plumbing code" in
ViewModels/Framework
I think, so it wouldn't be too big of a deal if we added more. I'm also not opposed to adding 3rd party packages, as long as they're fairly widely used and are trustworthy.I'll leave the decision up to you, let's go with whatever you think provides the best balance in terms of effort/control.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you're thinking of using the
CommunityToolkit.MVVM
tools, they also built a DependencyInjection package with source generators that:With that, it's possible to build an improved version of the
ViewLocator
. Here's a demo project from @stevemonaco that uses the DI package.The package is experimental, but apparently it is used in production and they're just waiting for the first chance to push it into the stable Nuget feed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked Sergio about this in the past week or so. He said that his MEDI sourcegen is currently being used in Windows Store, but he's lacking the time to move the code base/packaging into
CommunityToolkit
proper.