-
Notifications
You must be signed in to change notification settings - Fork 780
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
Initial implementation of WinUI with samples and features working #853
base: master
Are you sure you want to change the base?
Conversation
@KasperSK do you want to complete this pr? |
Yes but I think I need to make another commit and fix the small issues. :) |
Just wondering how far off we are from seeing this in a release? I've been using caliburn.micro in WPF apps for nearly 8 years, but I'm currently working on a WinUI app, and the amount of non-sense you have to do for basic View/ViewModel binding (and the amount of concrete references you need to have from the view to the view model) is just staggering after working in a fully auto-wired caliburn app... |
@vb2ae Do you still think we should merge this if I rebase the PR? |
yes we can fix any bug we find |
@KasperSK thanks |
Updated README.md to reflect changes in description and package details. Modified `MessageDialogResult.cs` to use `_content` and `_title`. Updated `App.xaml` and `App.xaml.cs` with XML declaration, removed comments, and added navigation to `MenuView`. Updated `Features.WinUI3.csproj` to target .NET 8.0 and adjusted settings. Cleaned up `RootView.xaml.cs` and other files by removing unused directives. Updated `Package.appxmanifest` and `app.manifest` for Windows 10 compatibility. Renamed bindings in `ActionsView.xaml`, `NavigationSourceView.xaml`, and `NavigationTargetView.xaml`. Updated `Microsoft.NET.Test.Sdk` and `Nerdbank.GitVersioning` packages. Improved formatting and consistency in several files. Added strong name key files.
Feature/winui update
catch(Exception ex) | ||
{ | ||
return Task.FromException(ex); | ||
} |
Check notice
Code scanning / CodeQL
Generic catch clause Note
catch (Exception ex) | ||
{ | ||
tcs.TrySetException(ex); | ||
} |
Check notice
Code scanning / CodeQL
Generic catch clause Note
catch (Exception ex) | ||
{ | ||
return Task.FromException<T>(ex); | ||
} |
Check notice
Code scanning / CodeQL
Generic catch clause Note
catch (Exception ex) | ||
{ | ||
tcs.SetException(ex); | ||
} |
Check notice
Code scanning / CodeQL
Generic catch clause Note
@@ -21,7 +27,9 @@ | |||
/// </summary> | |||
public class XamlPlatformProvider : IPlatformProvider { | |||
#if WINDOWS_UWP | |||
private readonly CoreDispatcher dispatcher; | |||
private CoreDispatcher dispatcher; |
Check notice
Code scanning / CodeQL
Missed 'readonly' opportunity Note
private readonly CoreDispatcher dispatcher; | ||
private CoreDispatcher dispatcher; | ||
#elif WinUI3 | ||
private DispatcherQueue dispatcher; |
Check notice
Code scanning / CodeQL
Missed 'readonly' opportunity Note
var dummy = dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => action()); | ||
#elif AVALONIA | ||
dispatcher.Post(action); | ||
#elif WinUI3 | ||
var dummy = dispatcher.TryEnqueue(() => action()); |
Check warning
Code scanning / CodeQL
Useless assignment to local variable Warning
dummy
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.
should change to _ = dispatcher.TryEnqueue(() => action());
@@ -0,0 +1,72 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<PropertyGroup> | |||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework> |
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.
could you change this to net8.0-windows10.0.19041 .net 6 is no longer supported
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework> | ||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion> | ||
<RootNamespace>Caliburn.Micro</RootNamespace> | ||
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers> |
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.
could you change this to
win-x86;win-x64;win-arm64
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.
just need to move to .net8.0 from .net6.0 which is no longer supported
I will get on that :) |
This works but navigation is a little rough around the edges, open for input on how it should be done for WinUI