microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.36k stars 679 forks source link

πŸ‘¨β€πŸ’»β˜Ž WinUI Community Call: November 17, 2021 #6310

Closed gabbybilka closed 2 years ago

gabbybilka commented 2 years ago

This live event has now ended, but you can view the recording on YouTube at the link below. If you didn't get your question answered, feel free to open it up as a question on this repo. Thanks all for joining!

https://youtu.be/kDj9XeKYYJk

Details

Date: November 17, 2021 Time: 16:00-17:00 UTC (9:00-10:00am Pacific)

Anyone and everyone is welcome - no pre-registration is required. This will be an informal interactive live stream directly with members of our engineering team.

Format

The community call is a call among the WinUI team that is live-streamed onto YouTube. We present on new updates, share information, welcome guests, and answer your questions. In this month's call, we'll be sharing WinUI roadmap updates and info about WinUI 3 in Windows App SDK 1.0.

Agenda

Q&A Code of Conduct

Leave us your questions in the comments on this issue or live in the YouTube chat during the stream!

kmgallahan commented 2 years ago

Please o lord of productivity let there be official support for .NET 6 & C# 10 soon πŸ™

Was so excited for VS 2022 & .NET 6 release, didn't realize it was all for naught

Yeah WinUI 3/WASDK is still based on .NET 5 from their last release. So I'm not sure yet on the timing of a plan on migrating to .NET 6 yet, we just synced with their release for the last 1.0-preview3 finally. Once they support it though, we'll update our WinUI packages to match.

4591

niels9001 commented 2 years ago
mdtauk commented 2 years ago

Has any more work been done on finding a usable alternative for Mica in Windows 10, beyond using a neutral solid colour?

llothar commented 2 years ago

Will there be tutorials for C++ programmers who have never done Windows GUI programming before?

pjmlp commented 2 years ago

If there is any future on XAML C++, please actually provide a proper roadmap for when C++/WinRT tooling will be at the same level as C++/CX is, without having to mess with IDL files without VS support or manually copying and merging manually generated C++ code, at the same level as Qt and C++ Builder provide in 2021, and have been doing for the last 25 years.

Right now WinUI with C++ seems to be something that only Microsoft employees are willing to put up with, given the internal love for ATL/WRL like tooling, even MFC feels more productive.

The lack of WinUI sessions with C++ on the VS 2022 release party confirms that we should focus on .NET for WinUI.

VincentH-Net commented 2 years ago

Please o lord of productivity let there be official support for .NET 6 & C# 10 soon πŸ™

Was so excited for VS 2022 & .NET 6 release, didn't realize it was all for naught

4591

WinUI 3 Preview 3 Desktop on .NET 6 and C# 10 works for me in VS 2022 17.1 Preview 1 (on Windows 11). I only needed to change the 5 to a 6 in <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework> So far no problems.

However, I would like to see an issue / roadmap item to track when this is officially supported & documented. Also - has anything regarding this changed in the 1.0 GA release (ETA today)?

Could this be discussed in the call? Thx!

harvinders commented 2 years ago

Could someone shed some light on if we can create XAML based plugins for C# WinUI3 desktop apps? It is critical requirement for us to be able to move our application to WinUI 3.

  1. Is it possible to package these XAML based plugins in Optional Package? See here. How can it be done? There is no visual studio template. It use to be there for UWP apps. Is it possible to hand code something?
  2. Currently, loading User's XAML controls into AssemblyLoadContext from a plugin dll located in non-main app folder gives XAML parse exception as pointed out here in #6299. Is there a work an around?
StefanKoell commented 2 years ago

What about WPF? Plans to use WinUI3 in WPF apps? What's the current state and what's planned for WPF?

kmgallahan commented 2 years ago

@VincentH-Net My issue was that the CommunityToolkit WinUI package isn't compatible and depends on official support first.

I would like to see an issue / roadmap item to track when this is officially supported & documented.

It is kind of on the roadmap as "Supports the latest .NET". But the roadmap was last updated ~a month ago before .NET 6 release.

Screenshot 2021-11-16 070416

VincentH-Net commented 2 years ago

@kmgallahan

My issue was that the CommunityToolkit WinUI package isn't compatible and depends on official support first.

I am asking because I am creating a C# Markup for WinUI 3 library that requires C# 10 and therefore .NET 6; having official support is relevant for potential consumers of my library.

harvinders commented 2 years ago

@VincentH-Net please see https://github.com/microsoft/WindowsAppSDK/discussions/1755

snickler commented 2 years ago

Please o lord of productivity let there be official support for .NET 6 & C# 10 soon πŸ™

Was so excited for VS 2022 & .NET 6 release, didn't realize it was all for naught

4591

During .NET Conf, the team showed samples running with .NET 6 and 1.0.0 preview 3. I also do recall hearing that .NET 6 IS supported, it just wasn't explicitly stated. That's what the ".NET 5+" referred to.

VincentH-Net commented 2 years ago

Question for the community call:

Does anyone on the team know how to use the .NET MetaDataUpdateHandler attribute for reacting to .NET hot reload in WinUI 3? Or is that broken? (I already asked @LyalinDotCom and he responded, no luck yet though)

I would like to use that to rebuild the current page UI on .NET hot reload (so a C# edit, not a XAML edit). Below code follows the above doc, but does not fire on a successful code update from VS 2022 17.1 Preview 1 in a WinUI 3 desktop project:

using System;
using System.Reflection.Metadata;
using WinUIApp2;

[assembly: MetadataUpdateHandler(typeof(PageMetaDataUpdateHandler))]

namespace WinUIApp2;

internal static class PageMetaDataUpdateHandler
{
    public static void UpdateApplication(Type[] updatedTypes)
    {
        XLog.Debug("Hot reload UpdateApplication!");
    }
}
kmgallahan commented 2 years ago

@snickler I'm aware it can work, but as I linked the CommunityToolkit isn't compatible without 'official' support.

Yeah WinUI 3/WASDK is still based on .NET 5 from their last release. So I'm not sure yet on the timing of a plan on migrating to .NET 6 yet, we just synced with their release for the last 1.0-preview3 finally. Once they support it though, we'll update our WinUI packages to match.

snickler commented 2 years ago

@snickler I'm aware it can work, but as I linked the CommunityToolkit isn't compatible without 'official' support.

Yeah WinUI 3/WASDK is still based on .NET 5 from their last release. So I'm not sure yet on the timing of a plan on migrating to .NET 6 yet, we just synced with their release for the last 1.0-preview3 finally. Once they support it though, we'll update our WinUI packages to match.

We have official .NET 6 support! \o/

image

harvinders commented 2 years ago

WinAppSDK 1.0 still got released with incorrect TabView style #6076. Would we have to wait till 1.1 for it to be fixed or there is a plan for a servicing release to fix these minor issues (maybe for some folks, major)?

LyalinDotCom commented 2 years ago

Question for the community call:

Does anyone on the team know how to use the .NET MetaDataUpdateHandler attribute for reacting to .NET hot reload in WinUI 3? Or is that broken? (I already asked @LyalinDotCom and he responded, no luck yet though)

I would like to use that to rebuild the current page UI on .NET hot reload (so a C# edit, not a XAML edit). Below code follows the above doc, but does not fire on a successful code update from VS 2022 17.1 Preview 1 in a WinUI 3 desktop project:

using System;
using System.Reflection.Metadata;
using WinUIApp2;

[assembly: MetadataUpdateHandler(typeof(PageMetaDataUpdateHandler))]

namespace WinUIApp2;

internal static class PageMetaDataUpdateHandler
{
    public static void UpdateApplication(Type[] updatedTypes)
    {
        XLog.Debug("Hot reload UpdateApplication!");
    }
}

This approach is not yet considered supported, it is why we have not documented the API or recommended people try it. I DMed you some code examples you try (via Twitter) if you want to test it yourself just to explore things.

This is on my roadmap to address next year when we get more stuff tested, documented, etc. Supporting this scenario broadly is definitely on my list.

IngmarBitter commented 2 years ago

I am currently using VS2022 + WinForms + Dx12 + TerraFX. So everything is C# 10. Would be great to be able to change WinForms to WinUi3 and keep everything else as is. The part that I'd welcome a demo sample for is how to setup a Dx12 swap chain in WinUi3, preferably using only C#, not C++. But a C++ based sample is better than nothing.

As a side note, I feel Microsoft is advertising WinUi3 as the UI of the future, C# as the application development language of the future and Dx12 as the graphics library of the future. But there is no official support for having all three or even just the latter two in a single application. Is there a plan to support that at some point?

VincentH-Net commented 2 years ago

This approach is not yet considered supported, it is why we have not documented the API or recommended people try it. I DMed you some code examples you try (via Twitter) if you want to test it yourself just to explore things.

Thanks for the help @LyalinDotCom, I explored that code but did not get any updates in a WinUI 3 Desktop project (hence the "no luck yet though"). I dm-ed you with follow-up. .NET hot reload with WinUI3 is a true game changer 😎

pylorak commented 2 years ago

Mica and Acrylic have different uses in Windows 11. But Acrylic in Windows 10 was often used in places where Mica is preferred now in Windows 11. This means apps would benefit from a material (used as the window base layer under all other controls) that uses Mica when run on W11 but falls back to Acrylic on W10, for visually best and most consistent platform support. Beside Mica, will you also provide a version of Mica with graceful fallback to Acrylic in WinUI 3?

kmgallahan commented 2 years ago

How is support for custom titlebars coming along for Windows 10?

harvinders commented 2 years ago

@marb2000 If I understood correctly during the community call, you mentioned that we can load XAML content using reflection from other assemblies

Currently, loading User's XAML controls into AssemblyLoadContext from a plugin dll located in non-main app folder gives XAML parse exception as pointed out here in WinUI 3 Cant instantiate a UserControl from a location outside the application package or directory (XamlParseException) #6299. Is there a work an around?

However, that is not the case if that assembly is not present at the same location as the main application assemblies pointed out by @williamfigtree in #6299. After further investigation I found, it is the absence of the xbf file from the plugin which is leading to the XAMlParseException, if I copy the plugin's XAML files next to the main application installation folder or a subfolder it works.

harvinders commented 2 years ago

WinAppSDK 1.0 still got released with incorrect TabView style #6076. Would we have to wait till 1.1 for it to be fixed or there is a plan for a servicing release to fix these minor issues (maybe for some folks, major)?

@gabbybilka you asked me for the reason why we need this to be fixed in the servicing release. Our application is based on the TabView style just as the Microsoft Edge is and this issue is preventing us from releasing the application to our clients. Imagin releasing Microsoft edge with tabview looking like image